Created
September 25, 2018 02:49
-
-
Save Visionchen/4de11279e6321f36f63363c6d443d763 to your computer and use it in GitHub Desktop.
使用AS编译失败问题解决
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### 使用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