前端时间项目组让我改一个比较老的项目,说是用Android Studio2.3版本可以直接运行,于是我下载了一个2.3.2的,结果出现了一堆问题,总结下:

首先导入项目后build完直接报出:No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

看异常可以知道是NDK出现了问题,上述异常意思是没有找到NDK目录下toolchains文件夹下mips64el-linus-android,然后从本地查看下NDK路劲,确认下文件夹中到底有没有该文件

然后进入该文件夹中看下:/Library/Android/sdk/ndk/20.0.5594570/toolchains。结果确实没有mips64el-linux-android这个文件夹

去网上搜了一下才知道是当前使用的NDK的版本高了导致的,最新的 NDK 移除了对mipsabi 的支持,并且早期版本的 android gradle 插件仍然检查 mips 工具链的存在。

想要使用就得下载r17之前的版本。

解决方案:

方案一:升级gradle插件至最新版,同时NDK版本也要更新至最新版(更新完插件会自动下载最新版NDK)。

也可以手动下载,新版下载地址:https://developer.android.google.cn/ndk/downloads

 classpath "com.android.tools.build:gradle:3.2.0"

方案二:使用NDK r17之前的版本,因谷歌对旧版本不做支持,特将旧版整理了一页:旧版下载地址:https://github.com/android/ndk/wiki/Unsupported-Downloads

下载完后解压一下,然后将解压完的文件放入/Library/Android/sdk/ndk/ 路径中,最后再去AndroidStudio中配置下NDK路径即可。

至此就可以重新rebuild一下项目了。

Mac电脑:要是从网站上手动下载的NDK,rebuild项目时会有弹框提示:无法打开“clang”,因为无法验证开发者。

这时不要点击移动到废纸篓,点击取消,随后进入该文件夹路径:

/Library/Android/sdk/ndk/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin

把 clang 和 clang++ 这两个文件右键-使用终端打开,运行一下就好了,然后回到AndroidStudio从新rebuild下就好了。

吐槽下网上其他的解决案例:

百度上的帖子有的给出的下载链接都点击不进去,可能需要FQ才能下载(估计帖子年头长了,现在谷歌给出了中国的开发者平台,很快、很香)

stack overflow上的解决方案(我已经测试过了,不好用,呵呵,感兴趣的可以尝试下):

1、在现有的NDK中创建一个mips64el-linux-android文件夹。

2跟arm-linux-androideabi-4.9 文件夹做个关联,从而实现骗过gradle的插件检查

# on Mac
cd ~/Library/Android/sdk/ndk/20.0.5594570/toolchains
ln -s aarch64-linux-android-4.9 mips64el-linux-android
ln -s arm-linux-androideabi-4.9 mipsel-linux-android

整理不易,转载请注明出处,谢谢!

[解决] No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android的更多相关文章

  1. 解决"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"错误

    今天安装了Android Studio 3.2,打开一个旧工程,编译提示"No toolchains found in the NDK toolchains folder for ABI w ...

  2. 完美解决 No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    问题描述 好久之前的一个Android项目,最近需要重构一下 因为Android Studio的开发环境以及Gradle的版本等等都进行了一定的更新,于是导入Project以后,出现了报错: No t ...

  3. No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"

    安装完NDK的时候出现了这个错误,网上的办法是下载旧版的NDK,将其中的toolchain复制到新版的NDK中. 但其实不用这么麻烦. 经过对新版NDK的研究,发现NDK的更新记录里有一段话 This ...

  4. Error:No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    https://www.jianshu.com/p/fd3d49c7f1f8 通过Android Studio 的Sdk Manager安装NDK,安装完之后编译失败,报错信息如下: Error:No ...

  5. Android Studio - No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    错误提示: No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android 错 ...

  6. No toolchains found in the NDK toolchains folder for ABI with prefix

    通过Android Studio 的Sdk Manager安装NDK,安装完之后编译失败,报错信息如下: No toolchains found in the NDK toolchains folde ...

  7. Error:A problem occurred configuring project ':networklibrary'. > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    https://blog.csdn.net/dafeige8/article/details/87880998 https://blog.csdn.net/vocanicy/article/detai ...

  8. No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

    产生背景最近把Android Studio更新到3.0,更新之后出现了build错误:No toolchains found in the NDK toolchains folder for ABI ...

  9. 一条命令解决:No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

    1.找到目录D:\android\Sdk\ndk-bundle\toolchains.(根据自己的安装路径找到) 2.该路径下打开终端执行ln -sf aarch64-linux-android-4. ...

随机推荐

  1. iOS 实现简单的界面切换

    以下是在iOS中最简单的界面切换示例.使用了多个Controller,并演示Controller之间在切换界面时的代码处理. 实现的应用界面: 首先,创建一个window-based applicat ...

  2. BitBake使用攻略--从HelloWorld讲起

    目录 写在前面 1. 什么是BitBake 2. BitBake的安装 3. 使用BitBake构建一个HelloWorld工程 后续 写在前面 <BitBake使用攻略>系列文章将从今天 ...

  3. 当是class com.cosl.po.Pc$$EnhancerByCGLIB$$38c58f03时,反射属性都他妈不好用了

    当是class com.cosl.po.Pc$$EnhancerByCGLIB$$38c58f03时,反射属性都他妈不好用了 搞不懂为什么?

  4. 客户通过新型网络访问Web服务

  5. C++ 11新特性:std::future & std::shared_future) (转载)

    上一讲<C++11 并发指南四(<future> 详解二 std::packaged_task 介绍)>主要介绍了 <future> 头文件中的 std::pack ...

  6. 页码pageNo与SQL的limit进行换算

    /** * 计算出页码 */ public static int getPageNo(int pageNo,int pageSize){ if (pageNo<=1){ return 0; } ...

  7. 【LeetCode】1462. 课程安排 IV Course Schedule IV (Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 DFS 日期 题目地址:https://leetcod ...

  8. 【LeetCode】455. Assign Cookies 解题报告(Java & Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 Java解法 Python解法 日期 [LeetCo ...

  9. 【LeetCode】1001. Grid Illumination 解题报告(C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 哈希 日期 题目地址:https://leetcod ...

  10. 【LeetCode】649. Dota2 Senate 解题报告(Python)

    [LeetCode]649. Dota2 Senate 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地 ...