【发布时间】:2017-08-14 03:02:57
【问题描述】:
错误:将字节码转换为 dex 时出错: 原因:com.android.dex.DexException: 多个dex文件定义Lcom/google/android/gms/internal/zzbqy;
这个错误出现在我的 android 聊天应用程序中,我在这里找到了几个答案,但它无法解决我的问题。我正在为我的项目使用 Firebase,我已经成功完成了我的用户身份验证,并希望在实时数据库中应用他们的照片和用户名,但这个错误阻止了进一步的开发。我做错了什么导致这个错误发生?
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.john.androidchat"
minSdkVersion 16
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'
}
}
}
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.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.synnapps:carouselview:0.0.10'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
显示
build.gradle -
应用插件:'com.android.application'android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.example.john.androidchat" minSdkVersion 16 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' } } }
-
编译 'com.android.support:appcompat-v7:25.1.0' 编译 'com.android.support:design:25.1.0' 编译 'com.github.bumptech.glide:glide: 3.7.0'编译'de.hdodenhof:circleimageview:2.1.0'编译'com.google.code.gson:gson:2.8.0'编译'com.synnapps:carouselview:0.0.10'编译'com.google。 firebase:firebase-auth:10.2.0' 编译 'com.google.firebase:firebase-database:10.2.0' 编译 'com.android.support.constraint:constraint-layout:1.0.1' 编译 'com.google. firebase:firebase-storage:10.0.1' testCompile 'junit:junit:4.12'
-
添加这个问题部分。
-
设置
firebase-storage:10.2.0
标签: android firebase firebase-realtime-database