最佳答案
我试图生成一个签名的 apk,但总是得到相同的错误。
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
我无法归档该文件,但我尝试修改 gradle-wrapper. properties,但仍然得到相同的错误。
这是我的 gradle-wrapper. properties 文件
#Thu May 05 20:51:44 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
org.gradle.jvmargs=-Xmx2048m
我已经试过 Android Gradle 无法为对象堆保留足够的空间了