登录 用户中心() [退出] 后台管理 注册
   
您的位置: 首页 >> CLQ工作室开源代码 >> 主题: No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi 的解决     [回主站]     [分站链接]
标题
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi 的解决
clq
浏览(354) + 2022-01-05 10:58:14 发表 编辑

关键字:

[2022-01-05 11:09:20 最后更新]


No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi 的解决

其实 “arm-linux-androideabi” 也是关键,应该是我的 ndk23 去掉了对这种类型系统的支持。实际上我们也用不到,不过某些库里是指定了的。
折腾了一天的结果是在 asd 中下载 ndk18 然后在 project struct 的设置中选中这个目录就可以了。它的 toolchains 目录下确实有这个平台的。

至于是哪个第三库引起的,实在是无从查起了。

------------------------------------------------
https://blog.csdn.net/qq_24118527/article/details/82867864

处有一个直接修改文件夹的方法,没测试。可能可行



clq
2022-01-05 11:07:23 发表 编辑

记录下采取过的失败方法。

https://blog.csdn.net/zhujm320/article/details/115748276

禁用 so 的优化。没成功,但这个办法可能在别的地方很有用。

方案1. 打包so时,禁止NDK进行优化

在build.gradle中添加如下代码

android{

...


buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}

debug {
signingConfig signingConfigs.debug
}
}

//禁止优化so
packagingOptions{
doNotStrip "**/*.so"
}

...

}

------------------------------------------------

https://www.cnblogs.com/imist/p/11417652.html

使用更新的(或者更旧的)gradle 。未成功。虽然看上去是更合理的做法。

------------------------------------------------
一个看上去很高端的做法。没成功。但其中的参数很值得研究一下。
https://stackoverflow.com/questions/53488763/no-toolchains-found-in-the-ndk-toolchains-folder-for-abi-with-prefix-mipsel-lin



According to 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.

The workarounds are as below: (https://stackoverflow.com/a/51852529/8034839)

Option 1:

buildTypes {
debug {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
release {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
}

Option 2:

android {
...
packagingOptions{
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
...
}





clq
2022-01-05 11:09:20 发表 编辑

另外,大概是 android 的 sdk ndk 变化太大的原因。基本上这些文中的目录太多都对不上。


总数:2 页次:1/1 首页 尾页  
总数:2 页次:1/1 首页 尾页  


所在合集/目录



发表评论:
文本/html模式切换 插入图片 文本/html模式切换


附件:



NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.

Copyright © 2005-2020 clq, All Rights Reserved
版权所有
桂ICP备15002303号-1