java.lang.OutOfMemoryError:在Android 1.4上超出了GC开销限制 [英] java.lang.OutOfMemoryError: GC overhead limit exceeded on Android 1.4
本文介绍了java.lang.OutOfMemoryError:在Android 1.4上超出了GC开销限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这些是我的依赖:
依赖关系{
编译项目(':android-crop')
编译项目(':RTEditor-Toolbar')
编译文件('libs / apache-mime4j-0.6.jar')
编译文件('libs / httpmime-4.1.3.jar')
/ *编译文件('libs / httpcore编译文件('libs / jetbrains-annotations.jar')
编译文件('libs / pinchzoom.jar')
编译文件('-4.4.1.jar')* /
编译文件
compile'com.google.android.gms:play-services:7.8.0'
compile'com.android.support:multidex:1.0.0'
compile'com.android.support:appcompat-v7:22.2.1'
compile'com.android.support:cardview-v7:22.2.1'
compile'com.android.support:design :22.2.1'
compile'com.android.support:recyclerview-v7:22.2.1'
compile'com.android.support:support-v4:22.2.1'
//三方库
编译'com.squareup.picasso:picasso:2.5.2'
编译'com.mcxiaoke.volley:library:1.0.18'
compile'com.vinaysshenoy:mugen:1.0.1'
compile'com.github.clans:fab:1.5.5'
compile'com.nineoldandroids:library:2.4.0'
compile'com.github.curioustechizen.android-ago:library:1.3.0'
compile'com.squareup.okio:okio :1.5.0'
compile'com.squareup.okhttp:okhttp:2.4.0'
compile'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile(' com.crashlytics.sdk.android:crashlytics:2.5.1@aar'){
transitive = true;
}
这怎么解决?
解决方案
javaMaxHeapSize4g
}
这将解决您的问题。不过,如果您遇到问题,请参阅以下链接:
I get an java.lang.OutOfMemoryError: GC overhead limit exceeded when run gradle on Android 1.4 ... these are my depedencies :
dependencies {
compile project(':android-crop')
compile project(':RTEditor-Toolbar')
compile files('libs/apache-mime4j-0.6.jar')
compile files('libs/httpmime-4.1.3.jar')
/* compile files('libs/httpcore-4.4.1.jar')*/
compile files('libs/jetbrains-annotations.jar')
compile files('libs/pinchzoom.jar')
compile files('libs/gcm.jar')
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
//three party library
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.vinaysshenoy:mugen:1.0.1'
compile 'com.github.clans:fab:1.5.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.curioustechizen.android-ago:library:1.3.0'
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.1@aar') {
transitive = true;
}
How can this be fixed?
解决方案
Add this to your android closure(build gradle):
dexOptions {
javaMaxHeapSize "4g"
}
This will solve your problem. Still, if you face problem see the following link
GC overhead limit exceeded error
这篇关于java.lang.OutOfMemoryError:在Android 1.4上超出了GC开销限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文