2015-11-18 10 views
13

मुझे एंड्रॉइड स्टूडियो में मेरे एंड्रॉइड ऐप के साथ एक अजीब समस्या है। कुछ नई फाइलें जोड़ने और build.gradle पर कुछ अपडेट करने के बाद आज तक सब कुछ ठीक काम कर रहा था।एंड्रॉइड स्टूडियो - build.gradle uncough अनुवाद त्रुटि में समस्या ExecutionException OutOfMemory

Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
6 errors; aborting 
Error:Execution failed for task ':myapplication:dexDebug'. 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_11\bin\java.exe'' finished with non-zero exit value 1 

आप नीचे मेरी build.gradle से संबंधित कोई समस्या है, तो जानते हैं:

मैं देख रहा हूँ त्रुटि संदेश निम्न है? नई लाइनें इस लाइन के नीचे "के तहत जोड़े गए नए डिप्लेन्सीज़ के अंतर्गत हैं। मैंने multDexEnabled को सत्य पर भी सेट किया है।

apply plugin: 'com.android.application' 
android { 
    compileSdkVersion 23 
    buildToolsVersion '23.0.1' 
    useLibrary 'org.apache.http.legacy' 

    defaultConfig { 
     applicationId "com.my.app" 
     minSdkVersion 14 
     targetSdkVersion 21 
     multiDexEnabled true 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_7 
      targetCompatibility JavaVersion.VERSION_1_7 
     } 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
    //useLibrary 'org.apache.http.legacy' 
} 

dependencies { 
    compile files('libs/aspectjrt-1.8.2.jar') 
    compile files('libs/isoparser-1.0-RC-27.jar') 
    compile files('libs/multiscreen-android-1.1.11.jar') 
    compile files('libs/picasso-2.5.2.jar') 
    compile files('libs/volley.jar') 
    compile 'com.facebook.android:facebook-android-sdk:4.5.0' 
    compile 'com.android.support:appcompat-v7:23.0.1' 
    compile 'com.android.support:support-v13:+' 

    /* NEW DEPENDENCIES BELOW THIS LINE */ 
    compile 'com.android.support:design:23.0.1' 
    compile 'com.android.support:cardview-v7:23.1.0' 
    compile 'com.github.bumptech.glide:glide:3.6.0' 
    compile 'de.hdodenhof:circleimageview:1.3.0' 

    // Used to optimize rendering of list views 
    // compile 'com.android.support:recyclerview-v7:23.1.0' 
    compile 'uk.co.chrisjenx:calligraphy:2.1.0' 
    //compile 'com.squareup.picasso:picasso:2.5.2' 

    compile 'com.google.android.gms:play-services:7.8.0' 
    //compile 'com.mcxiaoke.volley:library-aar:1.0.0' 
    compile 'com.google.android.gms:play-services-plus:7.8.0' 
    compile 'com.google.android.gms:play-services-wallet:7.8.0' 
} 

उत्तर

27

कोशिश अपने Android बंद में इस विकल्प के साथ अपने स्क्रिप्ट चलाने के लिए:

dexOptions { 
    javaMaxHeapSize "4g" 
} 

यह डेक्स संचालन के लिए अधिकतम ढेर आकार में वृद्धि होगी। आप कुछ स्पष्टीकरण in this SO question

+0

यह तय कर सकते हैं। धन्यवाद! – codeshark

+0

@ एंड्रॉइड-यूजर आपका स्वागत है) दूसरे प्रश्न के लिंक को जोड़ा, जहां इस विकल्प को अलग किया गया है – Stanislav

संबंधित मुद्दे