NDK can't find the application directory

后端 未结 11 1897
余生分开走
余生分开走 2020-12-12 15:03

When running the ndk-build command I get the following error:

Android NDK: Could not find application project directory !    
Android NDK: Please define the          


        
11条回答
  •  眼角桃花
    2020-12-12 15:15

    You need to specify 3 things.

    NDK_PROJECT_PATH - the location of your project
    NDK_APPLICATION_MK - the path of the Application.mk file
    APP_BUILD_SCRIPT - the path to the Android.mk file
    

    These are needed to override the default values of the build script, which expects things to be in the jni folder.

    When calling ndk-build use

    ndk-build NDK_PROJECT_PATH=/path/to/proj NDK_APPLICATION_MK=/path/to/Application.mk
    

    In Application.mk add

    APP_BUILD_SCRIPT := /path/to/Android.mk
    

提交回复
热议问题