问题一:
Error:Execution failed for task ':Test:transformClassesWithDexForDebug'.> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
出现这个问题的原因应该不单一, 这个只是一种:从网上也是搜索了好长时间, 有说是.9图片的合法性问题,有说是arraylist问题,但是都没有解决我的问题,之后仔细阅读了log, 发现有这么一段
Running dex as a separate process. To run dex in process, the Gradle daemon needs a larger heap. It currently has 1136 MB. For faster builds, increase the maximum heap size for the Gradle daemon to at least 2560 MB (based on the dexOptions.javaMaxHeapSize = 2g). To do this set org.gradle.jvmargs=-Xmx2560M in the project gradle.properties. For more information see https://docs.gradle.org/current/userguide/build_environment.html
实际上就是说内存不够用了,因此它给出了需要设定的内存大小:
org.gradle.jvmargs=-Xmx2560M
,所以在gradle.properties
这个文件夹里面按照它所说的改正,编译成功。
网友评论