- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我得到了
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
}
应用构建.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:1.1.13@aar'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile files('libs/google-play-services.jar')
}
apply plugin: 'com.google.gms.google-services'
最佳答案
Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/AccountPicker;
问题
相同的 com.google.android.gms:play-services
解决方案
从 build.gradle 和 Local lib 文件夹 中删除 google-play-services
。
compile files('libs/google-play-services.jar')
在那之后 Clean-Rebuild-Run
。
关于android - 多个dex文件定义Lcom/google/android/gms/common/AccountPicker;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45561061/
我正在尝试使用 Google Play 服务生成的 Intent 来选择 Google 帐户 private void showGoogleAccountPicker() { Intent g
我正在尝试学习如何在我的 Xamarin 中使用 AccountPicker 功能。 Android 应用程序,无法弄清楚我必须安装哪个包含此功能的库。 Android 文档可以在这里找到:https
我想使用 Google 实现 OAuth 登录。获取所有用户的带有图片的 Google 帐户的最佳方式是什么? 我可以使用 AccountPicker.newChooseAccountIntent 获
是否可以设置选择器对话框的主题? import com.google.android.gms.common.AccountPicker; .... String[] accountTypes = ne
我正在做一个项目,我必须显示帐户选择器,以便用户可以选择存储在他的设备中的电子邮件帐户。问题是我有 AccountPicker.newChooseAccountIntent 已弃用。 Is there
我试图让用户使用 AccountPicker 从相同类型的自定义帐户列表中进行选择。 Intent pickAccountIntent = AccountPicker.newChooseAccount
我正在尝试让用户使用以下代码选择一个电子邮件帐户: Intent intent = AccountPicker.newChooseAccountIntent(null, null, new Strin
在LoginActivity的onCreate方法中, button.setOnClickListener(new View.OnClickListener() { public void o
我已经在使用 Intent intent = AccountPicker.newChooseAccountIntent(...) 让用户选择使用哪个帐户登录,但我想获得相同的帐户列表而不用用户的交互,
我想通过 AccountPicker.newChooseAccountIntent 获取用户电子邮件 ID。我想要检测用户取消 AccountPicker 对话框 这是代码 private
我得到了 Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files defi
我正在使用以下代码显示来自 Google Play Services 的 AccountPicker 对话框: String[] accountTypes = new String[]{"co
我正在尝试将我的 NDK 应用程序与 Google Drive 集成。我正在关注 Sample Application并将其调整为从我的 native 代码中使用。我已经成功启动了帐户选择器,但现在我
好吧,我为此失眠了很多,我似乎找不到问题所在。 我正在尝试将 google drive 与我正在与团队合作的大型应用程序集成。 . 这是 logcat 输出的内容: 02-09 10:13:40.97
我正在尝试 Quickstart: Run a Drive App on Android来自 Google 云端硬盘 SDK。我遵循了 hole 过程,但是当我在我的设备(真实设备)中运行该应用程序时
我是一名优秀的程序员,十分优秀!