我在Android Studio中构建APP时收到此消息:
Running dex as a separate process.
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 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
我不确切地知道这意味着什么,因为我是新手,以及如何解决它。我有一个build.gradle(项目),一个settings.gradle和build.gradle(APP)。我需要修改哪一个以及如何修改?
谢谢!
答案 0 :(得分:1)
在项目org.gradle.jvmargs=-Xmx2048M
中设置gradle.properties
。有关详细信息,请参阅https://docs.gradle.org/current/userguide/build_environment.html
您还可以在build.gradle
android {
dexOptions {
javaMaxHeapSize "4g"
}
}