2017-12-02 203 views
0

合并DEX我尝试运行我的应用程序,但突然出现这个错误无法在运行Android应用程序

错误:执行失败的任务“:应用程序:transformDexArchiveWithExternalLibsDexMergerForDebug”。

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

然后我尝试搜索,并尝试解决方案,但所有的解决方案没有奏效 帮助我:(

这里是我的.gradle今天

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '26.0.2' 
    configurations.all { 
     resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9' 
    } 
    defaultConfig { 
     applicationId 'com.inhatc.jh.yourplaylist' 
     minSdkVersion 20 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    useLibrary 'org.apache.http.legacy' 
    productFlavors { 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile files('libs/jaudiotagger-2.2.4-SNAPSHOT.jar') 
    compile files('libs/glide-3.4.0.jar') 
    compile files('libs/google-api-services-youtube-v3-rev183-1.22.0.jar') 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.google.firebase:firebase-auth:10.0.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.android.support:cardview-v7:25.3.1' 
    compile 'com.google.android.gms:play-services-auth:10.0.1' 
    // Google Api Client library and Android extension 
    compile 'com.google.api-client:google-api-client-android:1.22.0' 
    // Change to the API you want to access: 
    // Below is just an example for People REST API access 
    compile 'com.google.apis:google-api-services-people:v1-rev4-1.22.0' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 
+0

请提供gradle stacktrace(使用'--debug'或'--info'运行) – Lino

+0

尝试清理哟你的项目,有时它发生在我身上,并且一个干净的构建解决了它 – jonathanrz

+0

我昨天尝试了清理和重建项目:l – redgee

回答

0

解决我的问题 我想念LIB /.jar文件和.gradle依赖关系

相关问题