入司接手的第一个项目由于半年没有更新维护,拉下代码后却编译不通过运行不起来;于是查阅资料解决一连串的问题,最后终于得以运行。
1、Mac 配置 adb 环境、gradlew:command not found
参考:http://wuxiaolong.me/2017/07/19/mac-adb-gradlew/
2、编译报错 Process 'command 'C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\26.0.0\aapt.exe'' finished with non-zero exit value 1
做好基础的clean rebuild 尝试后依然报错,于是google看了很多帖子,可能的原因有很多,考虑到适配26版本已经过时,就先从版本着手,将编译版本和适配版本号改为28,解决了这个问题。
参考:https://blog.csdn.net/qq_24118527/article/details/83586161
https://blog.csdn.net/tcpipstack/article/details/51559613
3、Cause: duplicate entry: android/support/v4/app/INotificationSideChannel$Stub$Proxy.class
参考:https://blog.csdn.net/hexingen/article/details/74065796
https://www.jianshu.com/p/7b2b8eb17b11
4、java.util.zip.ZipException: duplicate entry during packageAllDebugClassesForMultiDex
5、No resource found that matches the given name (at 'dialogCornerRadius' with
参考:https://www.jianshu.com/p/3bffd8e1a5da
6、Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...
参考:https://blog.csdn.net/lvshuchangyin/article/details/53785494
7、No resource identifier found for attribute 'appComponentFactory' in package 'android'
参考:https://blog.csdn.net/zxccxzzxz/article/details/82986956
8、"Unable to find optional library: org.apache.http.legacy"
参考:https://blog.csdn.net/qq_23089525/article/details/52038529
https://www.cnblogs.com/endian11/p/9882624.html
参考:https://juejin.im/entry/57a1a0c1128fe1005455a08e
9、multidex 问题 return code 1 for dex
参考:https://blog.csdn.net/m0_38079975/article/details/73181966
10、Android 28 网络请求报错 CLEARTEXT communication to host not permitted by network