我正在構建一個應用程序,使用位置融合提供程序和Firebase雲消息。當我用剛剛火力地堡的雲端通訊一切正常,但是當我加入熔位置,想建立的應用程序,控制檯使我這個錯誤:爲什麼Gradle會出現此錯誤?
Error:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:1 error; aborting
:presentation:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':presentation:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: `com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1`
這是我的gradle產出:
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileOptions.incremental = false
defaultConfig {
applicationId "com.telnet.asp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dataBinding {
enabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
apt 'com.google.dagger:dagger-compiler:2.2'
provided 'javax.annotation:jsr250-api:1.0'
compile project(path: ':domain')
compile project(path: ':data')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.0-rc2'
compile 'com.android.support:design:23.4.0'
compile 'javax.inject:javax.inject:1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.google.dagger:dagger:2.2'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'com.android.support:percent:23.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-messaging:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
不有人知道怎麼修這個東西嗎?請幫忙。
調用'buildToolsVersion 「24.0.0」' –
,並添加'dexOptions { 增量真 javaMaxHeapSize「 4g「 }' –