参与了一个新的项目,代码down下来一直RUN不起来,但是同事是可以的,搞了一整天啊,差点崩溃。
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 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
:app:transformClassesWithDexForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
刚开始一直报上面的错,加大了org.gradle.jvmargs=-Xmx1024m,然后报了
Basho 9:48:19
Error:Failed to complete Gradle execution.
Cause:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
上面的错,翻遍网上的解决方法都没有用,后来去看了任务管理器,发现我的jdk是32位的.....其实我发现这个问题的时候又去下了一个最新的JDK,但是不知道为什么它用的还是原来32位的,然后把两个JDK都卸载了,重新装了,打开AS,出现下面这个图