无法在 Android Studio 2.1.1 的 gradle.properties 文件中设置 JVM 参数 gradle
2022-09-04 03:47:54
- 在Mac OS X上运行Android 2.1.1
- 应用程序不在安卓手机上。
gradle.properties 文件的内容
org.gradle.jvmargs=-Xmx2048M
悬停时,IDE 指示它是未使用的属性。它也应该是深蓝色而不是灰色。
输出:
:MyProjectDirName:transformClassesWithInstantRunSlicerForDebug
:MyProjectDirName:transformClassesWithDexForDebug
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.
For more information see
https://docs.gradle.org/current/userguide/build_environment.html
编译器的输出清楚地表明它丢弃了 gradle.properties 文件的内容。
contents build.gradle
android {
dexOptions {
javaMaxHeapSize "2g"
}
}
也玩了这些设置,没有成功: