2016-04-06 11 views
2

署名したアプリケーションエラーを構築します。あなたは私がとることができるものを提供した限られた情報でAndroidのメーカーは、私は私のAndroid Studioから署名APKを作成しようとすると、私はこのエラーを取得する

:app:dexRelease 
AGPBI: {"kind":"simple","text":"UNEXPECTED TOP-LEVEL ERROR:","sources":[{}]} 
AGPBI: {"kind":"simple","text":"java.lang.OutOfMemoryError: GC overhead limit exceeded","sources":[{}]} 
+0

を必要とし、このリンクhttpを試してみてください。 //stackoverflow.com/a/33854389/3678308 –

答えて

2

はあなたエリアがOOM例外が直面しているということです建物のとき。あなたのアプリのgradleファイルに

dexOptions { 
    incremental true 
    javaMaxHeapSize "4g" 
} 

を使用することができます。これはあなたのアンドロイドの内側にあるべきです。(// blah blah)

これを打ちます。 乾杯!

0

持っている場合、私は同じエラーをあなたのアプリケーション

@Override 
protected void attachBaseContext(Context base) { 
    super.attachBaseContext(base); 
    //for multiDex 64k 
    MultiDex.install(this); 
} 


add proguard 

#suppresses "Ignoring InnerClasses attribute for an anonymous inner class" warning 
-keepattributes EnclosingMethod 

build.gradle

defaultConfig { 

    multiDexEnabled true 
} 

を持っている、とあなたは

dexOptions { 
    incremental true 
    javaMaxHeapSize "4g" 
} 
関連する問題