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

后端 未结 16 877
半阙折子戏
半阙折子戏 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:35

    Inside Android.mk file, you give the path where the jni folder loacted... in your case ARTOOLKIT_DIR :=/home/lambergar/work/APIExample/

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

    For me, deleted the .gradle and app/.externalNativeBuild directories and it worked.

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

    You need to set the env variable NDK_PROJECT_PATH to the root of the project you are building. The root of your NDK project will typically contain the ./jni directory.

    export NDK_PROJECT_PATH={root_of_project}
    

    If your JNI code is in a library, then set NDK_PROJECT_PATH to the library project.

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

    I just had the same problem. I fixed it by creating a Application.mk in $NDK/apps/ndktestapp with following content:

    APP_PROJECT_PATH := /cygdrive/c/workspace/MyApp
    

    and then calling

    make APP=ndktestapp
    

    from the NDK-Root. Hope that helps.

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

    as the same as @phavens, i think that only wrong with the word Android.mk and android.mk file, just spent for 5 minutes .. hehe

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

    Just spent an hour or two trying to figure this one out. Many, many people have had this problem. But as I found out I actually did not have a file name Android.mk it was named Andriod.mk and that was enough to cause me a lot of trouble. Sorry about my original rant but that was the whole problem in the end. I suggest if you have this problem you should check everything until you find something wrong.

    This fixed me right up. Thanks guys you put me on the right track anyway.

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