2016-07-26 1 views
0

J'ai déjà essayé tous les problèmes façons de résoudre MultidexlistForDebug possibles mais je suis toujours coincé plz Vérifiez mon fichier gradleErreur: Échec de l'exécution de la tâche « : speakup: transformClassesWithMultidexlistForDebug »

buildscript { 
    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 

apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

repositories { 
    maven { url 'https://maven.fabric.io/public' } 
} 

android { 
    compileSdkVersion 23 
    buildToolsVersion "24.0.0" 
// useLibrary 'org.apache.http.legacy' 
    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
    } 




defaultConfig { 

     applicationId "com.***" 
     minSdkVersion 11 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
    } 

    dexOptions { 
     javaMaxHeapSize "4g" 
     incremental true 
     preDexLibraries = false 
    } 
    buildTypes { 

     release { 
      multiDexEnabled true 

      minifyEnabled true 
      shrinkResources true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      debuggable false 
     } 
     debug { 
      multiDexEnabled true 
      debuggable true 
      minifyEnabled false 
     } 
    } 
    productFlavors { 
    } 

} 

dependencies { 
    compile 'com.clevertap.android:clevertap-android-sdk:2.0.5' 
    compile 'com.google.android.gms:play-services-gcm:6.5.87' 
    compile 'com.google.android.gms:play-services-analytics:6.5.87' 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:design:23.4.0' 
    compile project(':httpclient-4.3.6') 
    compile project(':httpcore-4.3.3') 
    compile project(':httpmime-4.3.6') 
    compile 'com.android.support:appcompat-v7:23.4.0' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.jakewharton:butterknife:7.0.1' 
    compile 'com.mcxiaoke.volley:library:1.0.19' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
} 

Erreur de compilation de temps

Information:Gradle tasks [:speakup:assembleDebug] 
:speakup:preBuild UP-TO-DATE 
:speakup:preDebugBuild UP-TO-DATE 
:speakup:checkDebugManifest 
:speakup:preReleaseBuild UP-TO-DATE 
:speakup:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE 
:speakup:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE 
:speakup:prepareComAndroidSupportDesign2340Library UP-TO-DATE 
:speakup:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE 
:speakup:prepareComAndroidSupportMultidex101Library UP-TO-DATE 
:speakup:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE 
:speakup:prepareComAndroidSupportSupportV42340Library UP-TO-DATE 
:speakup:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE 
:speakup:prepareComClevertapAndroidClevertapAndroidSdk205Library UP-TO-DATE 
:speakup:prepareComCrashlyticsSdkAndroidAnswers138Library UP-TO-DATE 
:speakup:prepareComCrashlyticsSdkAndroidBeta120Library UP-TO-DATE 
:speakup:prepareComCrashlyticsSdkAndroidCrashlytics260Library UP-TO-DATE 
:speakup:prepareComCrashlyticsSdkAndroidCrashlyticsCore2310Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE 
:speakup:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE 
:speakup:prepareIoFabricSdkAndroidFabric1312Library UP-TO-DATE 
:speakup:prepareDebugDependencies 
:speakup:compileDebugAidl UP-TO-DATE 
:speakup:compileDebugRenderscript UP-TO-DATE 
:speakup:generateDebugBuildConfig UP-TO-DATE 
:speakup:mergeDebugShaders UP-TO-DATE 
:speakup:compileDebugShaders UP-TO-DATE 
:speakup:generateDebugAssets UP-TO-DATE 
:speakup:mergeDebugAssets UP-TO-DATE 
:speakup:processDebugManifest UP-TO-DATE 
:speakup:fabricGenerateResourcesDebug 
:speakup:generateDebugResValues UP-TO-DATE 
:speakup:generateDebugResources 
:speakup:mergeDebugResources 
:speakup:processDebugResources 
:speakup:generateDebugSources 
:speakup:incrementalDebugJavaCompilationSafeguard UP-TO-DATE 
:speakup:compileDebugJavaWithJavac UP-TO-DATE 
:speakup:compileDebugNdk UP-TO-DATE 
:speakup:compileDebugSources UP-TO-DATE 
:speakup:prePackageMarkerForDebug 
:speakup:transformClassesWithJarMergingForDebug UP-TO-DATE 
:speakup:collectDebugMultiDexComponents UP-TO-DATE 
:speakup:transformClassesWithMultidexlistForDebug 
ProGuard, version 5.2.1 
Reading program jar [C:\Users\Amol\AndroidStudioProjects\Project22\speakup\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar] 
Reading library jar [C:\DriveZzzzzz\Android\Dev_Android_Sdk\android-sdk-windows\build-tools\24.0.0\lib\shrinkedAndroid.jar] 
Preparing output jar [C:\Users\Amol\AndroidStudioProjects\Project22\speakup\build\intermediates\multi-dex\debug\componentClasses.jar] 
    Copying resources from program jar [C:\Users\Amol\AndroidStudioProjects\Project22\speakup\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar] 
:speakup:transformClassesWithMultidexlistForDebug FAILED 
Error:Execution failed for task ':speakup:transformClassesWithMultidexlistForDebug'. 
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Java\jdk1.7.0_01\bin\java.exe'' finished with non-zero exit value 1 
Information:BUILD FAILED 
Information:Total time: 21.566 secs 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

Répondre

0
1 .Add multidex library in your dependency 

dépendances {

compile fileTree(dir: 'libs', include: ['*.jar']) 
compile 'com.android.support:multidex:1.0.1' 

} 

2. Dans votre manifeste

android: name = "android.support.multidex.MultiDexApplication" ou ajouter MultiDex.install (cela) dans votre méthode personnalisée attachBaseContext de l'application ou votre application personnalisée s'étendre MultiDexApplication

3 In your gradle add multidexEnabled 

defaultConfig { multiDexEnabled vrai minSdkVersion 15 targetSdkVersion 23 ... }

dexOptions { 
    incremental = true; 
    preDexLibraries = false 
    javaMaxHeapSize = "4g" // if your RAM is 4GB 
} 
+0

plz vérifier mon gradle j'ai déjà fait ces étapes. et j'ai déjà ajouté des détails dans le manifeste –

+0

avez-vous utilisé MultiDex.install (this) dans votre classe d'application méthode attachBaseContext ?? – Andolasoft

+0

Après une longue attente et frustration je viens de copier tous les fichiers dans un nouveau projet en commençant par les bibliothèques. Ne sachez pas si c'était un problème d'IDE ou une erreur de projet mais les mêmes fichiers fonctionnent bien dans un nouveau projet avec les mêmes bibliothèques. –