无法合并dex Android Studio错误
这是build.gradle(模块:app):无法合并dex Android Studio错误,android,build.gradle,Android,Build.gradle,这是build.gradle(模块:app): apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' android { compileSdkVersion 23 buildToolsVersion '23.0.3' defaultConfig { applicationId "com.demo.appdemo" minSdkVers
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.demo.appdemo"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libs:MaterialDrawer')
compile project(':libs:EasyPreferences')
compile project(':libs:PullToRefreshPheonix')
compile('com.github.afollestad.material-dialogs:commons:0.8.5.4@aar') {
transitive = true
}
compile 'me.leolin:ShortcutBadger:1.1.19@aar'
implementation 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.wdullaer:materialdatetimepicker:2.2.0'
compile 'com.github.jkwiecien:EasyImage:1.2.1'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.okio:okio:1.3.0'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'commons-io:commons-io:2.0.1'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.1.0'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
compile 'org.jdeferred:jdeferred-android-aar:1.2.4'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.nononsenseapps:filepicker:2.5.2'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:support-v4:23.4.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile "com.daimajia.swipelayout:library:1.2.0@aar"
}
apply plugin: 'com.google.gms.google-services'
运行应用程序时,出现以下错误:
运行应用程序时,出现以下错误:
运行应用程序时,出现以下错误:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Unable to merge
我试了很多次,但都失败了。请帮帮我!谢谢大家!
我试了很多次,但都失败了。请帮帮我!谢谢大家 我看到您启用了多索引,但没有完全启用
android {
defaultConfig {
multiDexEnabled true
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
另外,如果您还没有这样做,请按照中的步骤将多索引添加到应用程序类和清单中。Tks@Albuquerque!