Skip to content

Instantly share code, notes, and snippets.

@Visionchen
Created September 25, 2018 02:49
Show Gist options
  • Select an option

  • Save Visionchen/4de11279e6321f36f63363c6d443d763 to your computer and use it in GitHub Desktop.

Select an option

Save Visionchen/4de11279e6321f36f63363c6d443d763 to your computer and use it in GitHub Desktop.
使用AS编译失败问题解决
### 使用AS编译时
```language
,报Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concur
这是因为在project中导入了大量的第三方包,导致内存过大,在编译的时候出现的OOM,
解决方式
在build.gradle中添加如下代码
dexOptions{
javaMaxHeapSize "4g"
}
```
### androidStudio com.android.build.api.transform.TransformException
解决方案
```language
Error:Execution failed for task ':iDOQRcode:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/dot/autoupdater/AfinalHttp/AbstractCollection.class
先查找com/dot/autoupdater/AfinalHttp/AbstractCollection.class这个类是在哪一个包中,不出意外,在你的依赖项目里面有一个相同的类,我们只需要把其中一个删除就好了
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment