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

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

    Do not make any white space in the Project Directory. If errors come again then edit the build.gradle(Module:app) below buildTypes block and add those line like below:

     buildTypes {
        release {
           ......................
        }
    }
    sourceSets { main { jni.srcDirs = ['src/main/jni/','src/main/jniLibs/'] } }
    externalNativeBuild {
        ndkBuild {
            path 'build/intermediates/ndk/debug/Android.mk'
        }
    }
    
    0 讨论(0)
  • 2020-12-01 16:45

    in my case the project folder name had a space in it removed the space re imported it to Android Studio and that solved the problem

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

    I solved the problem by adding a new build to the project and voila, it works... Don't know what was the problem with the CLI build though.

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

    Please remove these directories

    rm -rf .externalNativeBuild //if exits
    
    rm -rf app/.externalNativeBuild
    
    rm -rf app/.cxx/ //if exits
    
    rm -rf app/build/
    

    then rebuild the project.

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