om.google.android.gms.common.api,多个dex文件定义Lcom/google/android/gms/common/AccountPicker;

Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/AccountPicker;

无法看到此刻的原因。 清洁没有帮助。

项目的build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.3.3'

classpath "io.realm:realm-gradle-plugin:2.0.2"

classpath 'com.google.gms:google-services:3.0.0'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

应用的build.gradle:

buildscript {

repositories {

maven { url 'https://maven.fabric.io/public' }

}

dependencies {

classpath 'io.fabric.tools:gradle:1.+'

}

}

apply plugin: 'com.android.application'

apply plugin: 'io.fabric'

repositories {

maven { url 'https://maven.fabric.io/public' }

}

apply plugin: 'realm-android'

android {

compileSdkVersion 24

buildToolsVersion '25.0.0'

defaultConfig {

applicationId "a.b.c.d"

minSdkVersion 16

targetSdkVersion 24

versionCode 6

versionName "1.0.5"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

dexOptions {

jumboMode = true

}

}

dependencies {

repositories {

mavenCentral()

maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }

maven { url "https://jitpack.io" }

}

compile fileTree(include: ['*.jar'], dir: 'libs')

testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:24.2.0'

compile 'com.android.support:design:24.2.0'

compile 'com.android.support:recyclerview-v7:24.2.0'

compile 'com.android.support:transition:24.2.0'

compile 'uk.co.chrisjenx:calligraphy:2.2.0'

compile 'com.android.support:support-v4:24.2.0'

compile 'com.facebook.android:facebook-android-sdk:4.+'

compile 'com.squareup.retrofit2:retrofit:2.1.0'

compile 'com.squareup.retrofit2:converter-gson:2.1.0'

compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'

compile 'com.android.support:cardview-v7:24.2.0'

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

compile 'com.android.support:support-v13:24.2.0'

compile 'com.appyvet:materialrangebar:1.3'

compile 'com.google.android.gms:play-services-location:10.0.1'

compile 'com.google.firebase:firebase-messaging:10.0.1'

compile 'org.greenrobot:eventbus:3.0.0'

compile 'com.google.code.gson:gson:2.4'

compile 'de.hdodenhof:circleimageview:2.1.0'

compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'

compile 'com.github.jkwiecien:EasyImage:1.2.3'

compile 'com.amazonaws:aws-android-sdk-core:2.3.0'

compile 'com.amazonaws:aws-android-sdk-s3:2.3.0'

compile 'com.github.chrisbanes:PhotoView:1.3.0'

compile files('libs/signalr-client-sdk.jar')

compile files('libs/signalr-client-sdk-android.jar')

compile 'com.afollestad.material-dialogs:core:0.9.1.0'

compile 'com.google.firebase:firebase-core:10.0.1'

compile 'com.makeramen:roundedimageview:2.3.0'

compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'

compile 'com.baoyz.pullrefreshlayout:library:1.2.0'

compile 'me.leolin:ShortcutBadger:[email protected]'

compile 'io.reactivex:rxandroid:1.2.1'

compile 'io.reactivex:rxjava:1.2.1'

compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {

transitive = true;

}

compile files('libs/google-play-services.jar')

}

apply plugin: 'com.google.gms.google-services'

+0

你真的需要所有的谷歌Play服务库 compile files('libs/google-play-services.jar')

你也需要删除的文件libs/google-play-services.jar:

删除此行?只使用需要的模块。 –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
关于Google Play services的各个分支介绍(MX5一定要安装XXXXXX-448分支) 要想使用google play, google map等google应用,就必须安装Google Play Service,但Google Play Service有太多分支了,最近终于搞明白各个分支代表什么。 版本号最后三位(2104405-XYZ)分别表示Android版本,cpu的arm系列,屏幕密度(DPI)。 下面是具体分支介绍: Notes / What's New Uploader's notes: To figure out the right version of Google Play services for your Android device, go to Settings -> Apps -> Google Play services, and look at the last 3 numbers in the parentheses. You'll see something like -XYZ where: 1.第一位X * X defines Android version: 0 for Android =5.0 // 4和7表示Android5.0及以上 8 for Android TV // 8表示Android电视应用 2.第二位Y * Y defines CPU architecture: 1 for armeabi 3 for armeabi-v7a // 32位版本 4 for arm64-v8a // 64位v8版本,MX5必须是这个 7 for x86 // x86主要是对intel cpu来说的 3.第三位Z * Z defines DPI: 0 for universal 2 for 160 4 for 240 6 for 320 8 for 480 // MX5选这个就行了 Notes: It seems that -7YZ builds became -4YZ with Google Play services 6.5. If you were on -7YZ before, you should now install -4YZ. Looks like -8YZ builds are for Android TV. Examples: -014 for Android <5.0 armeabi CPU 240 DPI device -438 for Android 5.0+ armeabi-v7a CPU 480 DPI device -876 for Android TV x86 CPU 320 DPI device 国内用户可以直接从以下镜像网站下载最新到Google Play Service http://www.apkmirror.com/apk/google-inc/google-play-services/ 目前最新版本是Google Play services 7.8.93 MX5用户可以安装以下分支: Google Play services 7.8.93 (2104405-448) http://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-7-8-93-2104405-448-android-apk-download/ 另外,安装后好需要禁止系统自带【应用中心】自动安装更新,可以设置面流量更新,但不要设置“静默安装更新包”,否则新版本发布后会自动更新成应用中心的最新版本,而最新版本的后三位可能不是你想要的分支,这时候就会导致弹出提示架构不符等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值