【发布时间】:2017-04-28 23:18:00
【问题描述】:
需要帮助。
错误:任务 ':app:transformClassesWithDexForDebug' 执行失败。 > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: 多个dex文件定义Lcom/google/android /gms/inte
应用程序在 api 级别 23 上运行,但在 api 16 上出现上述错误,这是我的 minsdk。
我的 gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.raghavkishan.financialplanner"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
谢谢。
【问题讨论】:
-
我尝试了那里提到的解决方案,但没有奏效。
-
@RaghavKishan 您关注的时候出现了什么错误?请始终提供完整的错误响应。
-
@Sufian 报错同上。我只使用了一个 google play services 依赖项,它是 Auth 依赖项。
标签: java android android-studio android-gradle-plugin android-authenticator