ndk-build编译出错:Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14

cmd命令行报错信息,如下:

PS D:\whx\AndroidStudioProject\VolumeII\Sample8_4\src\main\jni> ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersion 1 in D:/whx/AndroidStudioProject/VolumeII/Sample8_4/src/main/AndroidManifest.xml. NDK binaries will *not* be comptible with devices older than android-14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
Android NDK: NDK Application 'local' targets unknown ABI(s): all //鎸囨槑缂栬瘧鍜岃皟璇曠殑CPU鏋舵瀯
Android NDK: Please fix the APP_ABI definition in D:/whx/AndroidStudioProject/VolumeII/Sample8_4/src/main/jni/Application.mk
D:/development/tools/android-ndk-r16b/build//../build/core/setup-app.mk:75: *** Android NDK: Aborting    .  Stop.
PS D:\whx\AndroidStudioProject\VolumeII\Sample8_4\src\main\jni> ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersion 1 in D:/whx/AndroidStudioProject/VolumeII/Sample8_4/src/main/AndroidManifest.xml. NDK binaries will *not* be comptible with devices older than android-14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.

解决办法:

1、首先,修改项目默认最小android版本,由最小14改为大于14的其他版本。

2、然后,修改Application.mk文件,删除APP_ABI := all 语句,即可。

 

猜你喜欢

转载自blog.csdn.net/github_27263697/article/details/106451459