0
我有一個GC開銷限制的問題。編輯Gradle後超出GC開銷限制?
我遇到了這個錯誤我編輯的品位與更新GooglePlayServices並更新了Android版本的工作室到2.1.2
我不太清楚爲什麼會這樣,因爲我已經在我的實際旁邊改爲後一無所獲程序在嘗試運行之前。所以我懷疑來自Gradle的源代碼,儘管我不確定GC錯誤是2.1.2中的新功能還是因爲更新而發生的。
的gradle產出低於參考(這是應用程序模塊,唯一的gradle這個文件我搞砸)
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.example.denny.phonebelt"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled 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'
compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-database:9.0.0'
compile 'com.google.firebase:firebase-auth:9.0.0'
}
我很擔心這個問題,因爲我的堆大小太小,或者因爲我的程序有太多垃圾。我會明天嘗試你的方法(現在已經晚了),我會在這方面回覆你。還是)感謝你的建議! –
根據提供的信息,我可以看到兩種可能的情況:1.更新您的PlayService包含額外的文件並可能導致它2.早期版本的Android工作室幾乎處於GC開銷限制的邊緣,但由於較舊版本的PlayService具有較少的文件。 – mthakuri