gpt4 book ai didi

android - 谷歌 GMS :play service conflict with firebase

转载 作者:太空狗 更新时间:2023-10-29 16:29:58 27 4
gpt4 key购买 nike

我正在尝试在我已经使用谷歌地图的项目中添加 firebase-messaging。所以当我添加 firebase 依赖时

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

我遇到以下错误。

Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

我该如何解决这个问题这是我的 build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.edesign.astutesol.sallaticustomerapp"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.1.1'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.github.lecho:hellocharts-library:1.5.8@aar'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
apply plugin: 'com.google.gms.google-services'
compile 'com.google.firebase:firebase-messaging:10.0.1'

compile 'com.android.support:cardview-v7:25.+'
compile 'org.lucasr.twowayview:twowayview:0.1.4'

}

这些是谷歌依赖

compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
apply plugin: 'com.google.gms.google-services'
compile 'com.google.firebase:firebase-messaging:10.0.1'

最佳答案

在您的默认配置中启用 multidex。

defaultConfig {
applicationId "com.edesign.astutesol.sallaticustomerapp"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}

关于android - 谷歌 GMS :play service conflict with firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42017881/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com