在阅读了多篇文章之后,我仍然无法明确了解在构建时遇到此错误的情况。
"原因:com.android.dex.DexException:多个dex文件定义 Lcom / google / firebase / messaging / FirebaseMessaging;,sources = [未知 源文件],原始邮件=意外的顶级例外:"
我的build.gradle内容如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
applicationId "uk.co.quickdoc.mobileleaks" // this is the id that your app has
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile files('libs/classes.jar')
compile 'com.android.support:design:23.2.0'
}
dependencies {
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
}
dependencies {
compile 'com.google.android.gms:play-services-ads:11.0.4'
}
apply plugin: 'com.google.gms.google-services'
有什么想法吗?