插孔内存不足
Out of memory with jack
我正在测试新的编译链以开始使用 lambda。
我的 build.gradle
文件包含:
android {
...
compileSdkVersion 23
buildToolsVersion "24 rc3"
dexOptions {
jumboMode true
}
defaultConfig {
applicationId "my.app.id"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
我正在使用 Android Studio 2.1.1。
当我构建应用程序时,编译需要很长时间,然后以内存不足错误结束:
Execution failed for task
':app:compileAppNameJavaWithJack'.
java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
有时编译会在执行时挂起:
:app:compileMyAppNameDebugJavaWithJack
我找到了 in the troubleshooting section here 修复它的方法,但我找不到包含配置的 .jack
文件。
在 this bug report 中有人提到该文件可以重命名为 jack.settings 但我也找不到该文件。
你知道文件在哪里吗?您知道如何修复内存不足错误吗?
我设法解决了问题设置:
org.gradle.jvmargs=-Xmx2048M
在gradle.properties
文件中
检查 here 了解有关设置的更多信息
另见这个问题,它为我解决了这个问题:
我发现当我完成构建时,jack 的虚拟大小约为 8G。
我正在测试新的编译链以开始使用 lambda。
我的 build.gradle
文件包含:
android {
...
compileSdkVersion 23
buildToolsVersion "24 rc3"
dexOptions {
jumboMode true
}
defaultConfig {
applicationId "my.app.id"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
我正在使用 Android Studio 2.1.1。
当我构建应用程序时,编译需要很长时间,然后以内存不足错误结束:
Execution failed for task ':app:compileAppNameJavaWithJack'.
java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
有时编译会在执行时挂起:
:app:compileMyAppNameDebugJavaWithJack
我找到了 in the troubleshooting section here 修复它的方法,但我找不到包含配置的 .jack
文件。
在 this bug report 中有人提到该文件可以重命名为 jack.settings 但我也找不到该文件。
你知道文件在哪里吗?您知道如何修复内存不足错误吗?
我设法解决了问题设置:
org.gradle.jvmargs=-Xmx2048M
在gradle.properties
文件中
检查 here 了解有关设置的更多信息
另见这个问题,它为我解决了这个问题:
我发现当我完成构建时,jack 的虚拟大小约为 8G。