Android Studio  编译项目踩坑记

       入司接手的第一个项目由于半年没有更新维护,拉下代码后却编译不通过运行不起来;于是查阅资料解决一连串的问题,最后终于得以运行。

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

参考:https://stackoverflow.com/questions/26966843/java-util-zip-zipexception-duplicate-entry-during-packagealldebugclassesformult

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

参考:https://blog.csdn.net/castanea/article/details/81256422

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值