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

本文解决Android NDK编译时遇到的APP_PLATFORM版本不一致及ABI定义问题,通过调整最小支持版本和修改Application.mk文件,确保NDK二进制文件与设备兼容。

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 语句,即可。


 
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

闲暇部落

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值