Your APP_BUILD_SCRIPT points to an unknown file using Android ndk-build

后端 未结 16 875
半阙折子戏
半阙折子戏 2020-12-01 15:45

I get the following error while trying to compile an Android NDK project:

ndk-build 
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/lamb         


        
相关标签:
16条回答
  • 2020-12-01 16:21

    Just saw this problem today. In my case actual problem was spaces inside path to project.

    (yes, ndk-build will not compile your project if you have spaces inside folder name)

    0 讨论(0)
  • 2020-12-01 16:23

    Same problem (in Windows 7) but the cause is different.

    After searching in the Environment parameters, I've found the evil thing named "NDK_PROJECT_PATH" which has value is an invalid path.

    Deleted it and things are working again ;)

    0 讨论(0)
  • 2020-12-01 16:23

    In my case the problem was with white spaces in the project path. In such case, change the project path folders and import the project again.

    0 讨论(0)
  • 2020-12-01 16:23

    I just installed Android-NDK and tried "ndk-build". I had exactly the same error. Here is how I beat it.

    bash
    
    export NDK_PROJECT_PATH={root_of_android_ndk}/samples/hello-jni
    
    ./ndk-build
    

    This worked.

    0 讨论(0)
  • 2020-12-01 16:24

    Details of the problem:

    Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /jni/Android.mk ...: *** Android NDK: Aborting... . Stop. Usually this is not the path of your project, so the reason for this error is that ndk could not find the correct Android.mk file path. solution:

    Add NDK_PROJECT_PATH to "./" in the environment variable, the purpose is to tell the NDK that the jni currently to be compiled is located in the directory where the project is located.

    0 讨论(0)
  • 2020-12-01 16:28

    Gradle Experimental plugein in Android Studio add support for Native project build.

    0 讨论(0)
提交回复
热议问题