2016-09-23 31 views
6

アプリケーションの実行中に次の問題が発生しました。 Gradleのファイルにエラー:タスク ':app:transformJackWithJackForDebug'の実行に失敗しました

Error:Execution failed for task ':app:transformJackWithJackForDebug'. com.android.sched.scheduler.RunnerProcessException: Error during 'MethodIdMerger' runner on '': GC overhead limit exceeded

私も宣言したヒープサイズは

dexOptions { 
    preDexLibraries = false 
    javaMaxHeapSize "4g" 
} 

私はアンドロイドスタジオ2.2を使用していますし、JackOptionはが有効になっています。

更新:build.gradleは

apply plugin: 'com.android.application' 

repositories { 

    mavenCentral() 
} 

android { 

    compileSdkVersion 23 
    buildToolsVersion '24.0.2' 
    compileOptions.encoding = 'ISO-8859-1' 
    useLibrary('org.apache.http.legacy') 

    lintOptions{ 
     abortOnError false 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory' 
    } 

    defaultConfig { 
     applicationId "appID" 
     minSdkVersion 14 
     targetSdkVersion 22 
     versionCode 2033 
     versionName "6.1" 
     multiDexEnabled true 
     ndk { 
      abiFilters "armeabi", "x86" 
     } 
     jackOptions { 
      enabled true 
     } 
    } 

    dexOptions { 
     preDexLibraries = false 
     javaMaxHeapSize "4g" 
    } 

    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 

    } 
    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_8 
     targetCompatibility JavaVersion.VERSION_1_8 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile project(':SettingsPluginv9') 
    compile project(':DragLib') 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile project(':PDFViewCtrlTools') 
    compile project(':PullToRefreshLibrary') 
    compile project(':SmoothProgressBar') 
    compile project(':ViewpagerLibrary') 
    compile project(':BoxAndroidLibraryV2') 
    compile 'com.android.support:recyclerview-v7:23.0.1' 
    compile 'com.nuance:speechkit:[email protected]' 
    compile 'com.parse:parse-android:1.10.1' 
} 

それのための任意の可能な解決策が含まれて?

+0

私は同じ問題を抱えているあなたの 'build.gradle' –

+0

を示しました。今のところ唯一の解決策は、Android Studioを定期的に終了して再起動することです。そして時々私はOSを再起動する必要があります – kingston

答えて

7

私は、Gradle Daemon VMのメモリサイズを2GBに増やすことで上記の問題を解決することができました。これを行うには、変更する必要がありますgradle.properties

次の行をプロパティファイルに追加します。

org.gradle.jvmargs=-Xmx2048m

+1

これは私の問題を解決しません。ヒープが完全に食べられた時を延期するだけです。 – kingston

+0

@kingston:それは私のために解決します。それ以来、私は問題に直面していません.. – dreamcoder

+0

私のために働く。ありがとうございました – rosterloh

関連する問題