- 在 Mac OS X 上运行 Android 2.1.1
- 应用程序不在 Android 手机上。
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文件的内容。
内容 build.gradle
android {
dexOptions {
javaMaxHeapSize "2g"
}
}
也玩过这些设置,但没有成功: