问题描述

使用ndk-build编译so库的时候,控制台会报

Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
F:\Sdk\ndk-bundle\build\..\build\core\build-local.mk:151: *** Android NDK: Aborting . Stop.

解决办法

见文献1

1
2
3
//在<工程path>/app目录
// your_project_path是jni的目录,注意,目录一定要是jni,在AS中自动存放cpp文件的是cpp目录,需要改成jni才可以编译。
ndk-build -C your_project_path

问题描述

Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in G:/android_project/PlatformService_X5R/app/src/main/AndroidManifest.xml. NDK binaries will not be compatible with devices older than android-1.6
See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.

解决办法

在Application.mk文件中加

APP_PLATFORM := android-16

参考文献

解决:Could not find application project directory