使用mips64el-linux-android-strip,transformNativeLibsWithStripDebugSymbolForRelease执行失败
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了使用mips64el-linux-android-strip,transformNativeLibsWithStripDebugSymbolForRelease执行失败,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2226字,纯文字阅读大概需要4分钟。
内容图文
我在android studio中收到此错误,请有人知道如何解决它让我知道
Execution failed for task ':q84sale-base:transformNativeLibsWithStripDebugSymbolForRelease'.
> A problem occurred starting process 'command '/Users/amira/Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip''
解决方法:
原因:
根据https://github.com/android-ndk/ndk/wiki/Changelog-r18#known-issues
This version of the NDK is incompatible with the Android Gradle plugin version 3.0 or older. If you see an error like
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
, update your project file to use plugin version 3.1 or newer. You will also need to upgrade to Android Studio 3.1 or newer.
如上所述:
update your project file to use plugin version 3.1 or newer. You will also need to upgrade to Android Studio 3.1 or newer.
直接解决方案是:
从你的TOP-LEVEL build.gradle中,将android gradle插件的类路径更改为3.2.1或更高版本.
classpath 'com.android.tools.build:gradle:3.2.1'
但是,如果您想坚持使用现有的Gradle插件版本,那么解决方法/解决方案如下:
选项1:
自ndk-17以来,没有更多的mips架构.因此,您可以降级NDK(对于旧版本的NDK,请从此处查看:https://developer.android.com/ndk/downloads/older_releases)或添加abiFilters以排除mips ABI.
看到你正在使用ndk-bundle这是Android Studio的默认ndk路径设置.您可以从local.properties配置此路径,使其指向您的NDK版本,例如r16b,而不是默认的ndk-bundle.
ndk.dir=<path>/android-ndk-r16b
sdk.dir=<path>/sdk
选项2:
使用以下配置仅过滤必要的ABI.
android {
// Similar to other properties in the defaultConfig block, you can override
// these properties for each product flavor in your build configuration.
defaultConfig {
ndk {
// Tells Gradle to build outputs for the following ABIs and package
// them into your APK.
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
或者如果你正在使用cmake
buildTypes {
debug {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
release {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
}
选项3:
另一种解决方法是使用以下配置跳过mips的剥离:
android {
...
packagingOptions{
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
...
}
为您的案例选择最佳选择.
内容总结
以上是互联网集市为您收集整理的使用mips64el-linux-android-strip,transformNativeLibsWithStripDebugSymbolForRelease执行失败全部内容,希望文章能够帮你解决使用mips64el-linux-android-strip,transformNativeLibsWithStripDebugSymbolForRelease执行失败所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。