ndk r17b版本后不再支持mips报错的解决方案

问题描述和原因

使用r17b版本NDK编译时可能会出现报错

{sdkroot}/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64/bin/mips64el-linux-android-strip
复制代码

原因是r17版本中移除了对ARMv5 (armeabi), MIPS, and MIPS64 的支持 文档参考: developer.android.google.cn/ndk/downloa…

Announcements

  • GCC is no longer supported. It will be removed in NDK r18.
  • libc++ is now the default STL for CMake and standalone toolchains. If you manually selected a different STL, we strongly encourage you to move to libc++. Note that ndk-build still defaults to no STL. For more details, see this blog post.
  • gnustl and stlport are deprecated and will be removed in NDK r18.
  • Support for ARMv5 (armeabi), MIPS, and MIPS64 has been removed. Attempting to build any of these ABIs will result in an error.
  • Support for ICS (android-14 and android-15) will be removed from r18.
  • The Play Store will require 64-bit support when uploading an APK beginning in August 2019. Start porting now to avoid surprises when the time comes. For more information, see this blog post.

r17b版本公告

  • GCC不再受支持。它将在NDK r18中被删除。
  • libc ++现在是CMake和独立工具链的默认STL。如果您手动选择了不同的STL,我们强烈建议您转到libc ++。请注意,ndk-build仍默认为无STL。有关更多详细信息,请参阅 此博客文章
  • gnustl和stlport已弃用,将在NDK r18中删除。
  • 已删除对ARMv5(armeabi),MIPS和MIPS64的支持。尝试构建任何这些ABI将导致错误。
  • 将从r18中删除对ICS(android-14和android-15)的支持。
  • 从2019年8月开始上传APK时,Play商店将需要64位支持。现在开始移植以避免在时机成熟时出现意外情况。有关更多信息,请参阅 此博客文章

解决方法

在build.gradle中的android内添加

android {
    ...
    packagingOptions{  
        doNotStrip '*/mips/*.so'  
        doNotStrip '*/mips64/*.so'  
    } 
}
复制代码

其他方案

若要继续支持mips等abi,请降级到r16或以下,低版本的NDK可以在这里下载 developer.android.google.cn/ndk/downloa…

转载于:https://juejin.im/post/5c459d2ef265da610e805f39

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值