How to set NDK Build path in OSX for Android studio

前端 未结 4 1347
走了就别回头了
走了就别回头了 2020-12-29 05:56

I had set the ANDROID_NDK_HOME as /Users/Shajilshocker/Documents/Android/NDK/android-ndk-r10b using a mac osx application called Enviro

4条回答
  •  醉酒成梦
    2020-12-29 06:17

    Well, this is actually not enough to make the system aware of the path. You must add this path to the PATH system variable. In your case, all you have to do is to add the following line to your terminal configuration file (which should be under your home directory, named .bashrc if you kept the default terminal, full path: ~/.bashrc):

    export PATH=$PATH:/Users/Shajilshocker/Documents/Android/NDK/android-ndk-r10b
    

    What this line does is actually adding the path to your Android NDK directory to the PATH variable. You export a variable named PATH with its current content plus the directory of your NDK.

    Step by step:

    • Go in the home directory
    • Edit .bashrc
    • Add the line I showed above
    • Save, exit, then restart bash (you just have to type bash, then enter)

提交回复
热议问题