多个dex文件定义了Lcom/google/android/gms/internal/zzbqy; [英] Multiple dex files define Lcom/google/android/gms/internal/zzbqy;

查看:85
本文介绍了多个dex文件定义了Lcom/google/android/gms/internal/zzbqy;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:将字节码转换为dex时出错: 原因:com.android.dex.DexException:多个dex文件定义了Lcom/google/android/gms/internal/zzbqy;

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzbqy;

此错误出现在我的android聊天应用程序中,我在这里找到了几个答案,但无法解决我的问题.我正在为我的项目使用Firebase,我已经成功完成了对用户的身份验证,并希望将其照片和用户名应用到实时数据库中,但是此错误阻止了进一步的开发.我要怎么做才能解决这个错误?

this error came in my android chat app, i found couple answers here but it couldn't solve my problem. i am using Firebase for my project, i have successfully done authentication of my user and wanted to app their photo and username in realtime database but this error is preventing further development. what am i doing wrong for this error to come?

build.gradle

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'

推荐答案

对于具有匹配依赖项版本并仍然收到此错误的用户:

For those who with matching dependency versions and still receiving this error:

Firebase Android SDK现在具有独立的版本号,允许 以获得更频繁,更灵活的更新.

Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.

将所有Firebase依赖项更新到最新版本(截至2018年5月2日):

Update all your Firebase dependencies to the latest version (as of 2 May 2018):

 Firebase Core          com.google.firebase:firebase-core:15.0.2
    Ads                 com.google.firebase:firebase-ads:15.0.0
  Analytics             com.google.firebase:firebase-analytics:15.0.2
 App Indexing           com.google.firebase:firebase-appindexing:15.0.0
 Authentication         com.google.firebase:firebase-auth:15.1.0
Cloud Firestore         com.google.firebase:firebase-firestore:16.0.0
Cloud Functions         com.google.firebase:firebase-functions:15.0.0
Cloud Messaging         com.google.firebase:firebase-messaging:15.0.2
Cloud Storage           com.google.firebase:firebase-storage:15.0.2
Crash Reporting         com.google.firebase:firebase-crash:15.0.2
Crashlytics             com.crashlytics.sdk.android:crashlytics:2.9.1
Invites                 com.google.firebase:firebase-invites:15.0.2
Performance Monitoring  com.google.firebase:firebase-perf:15.1.0
Realtime Database       com.google.firebase:firebase-database:15.0.0
Remote Config           com.google.firebase:firebase-config:15.0.2

发行说明: https://firebase.google.com/support/release-notes/android

这篇关于多个dex文件定义了Lcom/google/android/gms/internal/zzbqy;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆