總結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文件添加..之間的紅色內容。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM