Android Studio - build.gradle 未捕获的翻译错误 ExecutionException OutOfMemory 中的问题
Android Studio - Issue in build.gradle uncaught translation error ExecutionException OutOfMemory
我在 Android Studio 中的 Android 应用程序遇到了一个奇怪的问题。一切似乎都运行良好,直到今天添加了一些 新文件 并对 build.gradle.
进行了一些更新之后
我看到的错误消息如下:
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
6 errors; aborting
Error:Execution failed for task ':myapplication:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_11\bin\java.exe'' finished with non-zero exit value 1
你知道我下面的build.gradle有没有问题?新行位于“NEW DEPENDENCIES ADDED BELOW THIS LINE”下。我还将 multiDexEnabled 设置为 true。
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.my.app"
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
//useLibrary 'org.apache.http.legacy'
}
dependencies {
compile files('libs/aspectjrt-1.8.2.jar')
compile files('libs/isoparser-1.0-RC-27.jar')
compile files('libs/multiscreen-android-1.1.11.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/volley.jar')
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v13:+'
/* NEW DEPENDENCIES BELOW THIS LINE */
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
// Used to optimize rendering of list views
// compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
//compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services:7.8.0'
//compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services-plus:7.8.0'
compile 'com.google.android.gms:play-services-wallet:7.8.0'
}
尝试在 android 闭包中使用此选项 运行 您的脚本:
dexOptions {
javaMaxHeapSize "4g"
}
这将增加 dex 操作的最大堆大小。你可以找到一些解释
我在 Android Studio 中的 Android 应用程序遇到了一个奇怪的问题。一切似乎都运行良好,直到今天添加了一些 新文件 并对 build.gradle.
进行了一些更新之后我看到的错误消息如下:
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
6 errors; aborting
Error:Execution failed for task ':myapplication:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_11\bin\java.exe'' finished with non-zero exit value 1
你知道我下面的build.gradle有没有问题?新行位于“NEW DEPENDENCIES ADDED BELOW THIS LINE”下。我还将 multiDexEnabled 设置为 true。
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.my.app"
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
//useLibrary 'org.apache.http.legacy'
}
dependencies {
compile files('libs/aspectjrt-1.8.2.jar')
compile files('libs/isoparser-1.0-RC-27.jar')
compile files('libs/multiscreen-android-1.1.11.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/volley.jar')
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v13:+'
/* NEW DEPENDENCIES BELOW THIS LINE */
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
// Used to optimize rendering of list views
// compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
//compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services:7.8.0'
//compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services-plus:7.8.0'
compile 'com.google.android.gms:play-services-wallet:7.8.0'
}
尝试在 android 闭包中使用此选项 运行 您的脚本:
dexOptions {
javaMaxHeapSize "4g"
}
这将增加 dex 操作的最大堆大小。你可以找到一些解释