解决JNI编译错误 – Application targets deprecated ABI(s): armeabi

一、JNI编译错误信息  compilation error message

在编译JNI时,会出现“armeabi / mips64 / mips会在将来的NDK版本中去掉”的错误提示,这些提示不影响编译结果,但每次弹出来也很不爽-_- !!

Android Studio compile the JNI will show error message as “armeabi / mips64 / mips will be removed in a future NDK release” , these tips do not affect the compilation results, but also very uncomfortable pop-up each time -_- !!

D:\Android\sdk\ndk-bundle\build\core\setup-app.mk
Error:(81) Android NDK: Application targets deprecated ABI(s): armeabi    
Error:(82) Android NDK: Support for these ABIs will be removed in a future NDK release.    
Error:(82) Android NDK: Support for these ABIs will be removed in a future NDK release.    
Error:(81) Android NDK: Application targets deprecated ABI(s): mips64    
Error:(82) Android NDK: Support for these ABIs will be removed in a future NDK release.    
Error:(81) Android NDK: Application targets deprecated ABI(s): mips

 

 二、解决方法  Solving method

方法1:在jni目录下的android.mk文件中,添加以下内容:

Method 1: Open the android.mk  in the JNI directory, and add the following:

# 仅编译时支持以下架构(去掉armeabi、mips64、mips)
APP_ABI := arm64-v8a armeabi-v7a x86 x86_64

方法2:直接注释ndk-bundle\build\core\setup-app.mk以下提示:

Method 2: Annotate ndk-bundle\build\core\setup-app.mk  following prompt:

#    $(call __ndk_warning,Application targets deprecated ABI(s): $(_deprecated_abis))
#    $(call __ndk_warning,Support for these ABIs will be removed in a future NDK release.)
打赏 赞(0)
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

x

共有 0 条评论

Top