zengjingfang / AndroidBox

Android开发知识、经验、资料等总结,作为个人的开发知识体系
Apache License 2.0
16 stars 3 forks source link

AndroidStudio踩坑录 #12

Open zengjingfang opened 6 years ago

zengjingfang commented 6 years ago

sync能过,编译apk时出现如下问题:java.util.zip.ZipException: duplicate entry

详细日志:

Information:Gradle tasks [:watch:assembleDebug]
Error:Execution failed for task ':watch:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/xtc/md5jni/GetMD5JniUtils.class
Information:BUILD FAILED
Information:Total time: 1 mins 28.198 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

分析原因:对应的jar包重复了

膜拜下欧神的博客

解决方案:

clean、或者删除重复的jar

zengjingfang commented 6 years ago

AndroidStudio 安装问题: Unable to access Android SDK add-on list

image

image

解决方案:

在目录下增加一句 disable.android.first.run=true

zengjingfang commented 6 years ago

『技巧』安全删除一个方法的参数

zengjingfang commented 6 years ago

Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

image

stackoverflow

解决办法

1、the gradle.properties and add this:

android.enableAapt2=false

2、可能是.9图的问题,但是

image

image

zengjingfang commented 6 years ago

image

Error:Execution failed for task ':lryapp:transformClassesWithProfilers-transformForDebug'. >3

手贱打开了这个设置,关闭就好了。 image

zengjingfang commented 6 years ago

image

Error:Execution failed for task ':basiclib:clean'.

Unable to delete file: E:\workplace\Comp\XTCWatch_Location\basiclib\build\intermediates\intermediate-jars\debug\classes.jar

解决办法

zengjingfang commented 6 years ago

Error:没有找到编码配置文件!

删除.gradle .idea 文件后报如下: image

解决方案

重新打开吧