总结jenkins Android自动打包遇到的坑

一、ndk-build报错

[root@hejianlai-jenkins LearnGradle]# ndk-build
/usr/local/android-ndk-r8/ndk-build: /usr/local/android-ndk-r8/prebuilt/linux-x86/bin/make: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

解决方法:安装glibc.i686
[root@hejianlai-jenkins LearnGradle]# yum install glibc.i686

二、ConstraintLayout for Android 1.0.2授权问题

解决方法:

到android sdk安装目录的tools/bin文件夹下,执行./sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"

三、缺少安装包

解决方法:

——查看所有的安装包

命令:android list sdk -a

——选择缺少的安装包,例如上述少了Android SDK Platform 26, Android SDK Build-Tools 26.0.2

 

 命令:android update sdk -a --no-ui --filter 45,9

 四、sdk和ndk的路径错误

解决方法:修改local.properties文件,修改为正确的目录路径。

五、app:lint

* What went wrong: Execution failed for task ':app:lint'. > Lint found errors in the project; aborting build. Fix the issues identified by lint, or add the following to your build script to proceed with errors: ... android { lintOptions { abortOnError false } } ... 按照提示操作即可


作者:壹尘子
链接:https://www.jianshu.com/p/c1b1b2817d90
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

 * What went wrong:
Execution failed for task ':app:lint'.
> Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
    lintOptions {
        abortOnError false
    }
}
...
按照提示操作即可,找到build.gradle文件添加..之间的红色内容。

posted @   西门运维  阅读(3414)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
点击右上角即可分享
微信分享提示