将 com.google.android.gms 的版本更新到 15.0.2

新手上路,请多包涵

我已经更新了我的 Firebase SDK 版本。但是将 com.google.android.gms 的版本更新到 15.0.2 时出现错误。我试图制作相同版本的 firebase 和 google 服务,但它不会工作。

依赖关系

dependencies {
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.android.support:design:26.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-ads:15.0.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'org.parceler:parceler-api:1.1.9'
annotationProcessor 'org.parceler:parceler:1.1.9'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'io.reactivex:rxjava:1.2.3'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.jakewharton.rxbinding:rxbinding:1.0.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
implementation 'com.google.dagger:dagger-android:2.11'
implementation 'com.google.dagger:dagger-android-support:2.11'
// if you use the support libraries
annotationProcessor 'com.google.dagger:dagger-android-processor:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.13'
implementation 'com.google.auto.value:auto-value:1.5.2'
implementation 'com.jakewharton.timber:timber:4.1.2'
implementation 'org.greenrobot:eventbus:3.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.twitter.sdk.android:twitter:3.1.1'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation project(':linkedin-sdk')
implementation 'com.azoft.carousellayoutmanager:carousel:1.2.1'
implementation 'com.android.support:multidex:1.0.2'
implementation 'gun0912.ted:tedpermission:2.1.0'
implementation project(':libphonenumber-5.9')
implementation 'com.facebook.android:facebook-login:4.30.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.android.support:exifinterface:26.1.0'
}

原文由 Ashutosh Shrestha 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 466
2 个回答

试试下面的代码:

1.build.gradle(渐变)

改变 :

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

到 :

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

请点击以下链接:

https://stackoverflow.com/a/50152496/6920195

原文由 Rohan Lodhi 发布,翻译遵循 CC BY-SA 4.0 许可协议

对于检查此问题的任何人,您遇到此冲突问题的主要原因是因为您使用的是旧版本的 Android Studio。

您需要执行以下操作:

将 Android Studio 升级到 3.1 版本

添加:

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

到(顶级)build.gradle 文件,然后您将能够使用最新版本。

查看以下内容以获取更多信息:

宣布新的 SDK 版本控制

编译未能完成:程序类型已存在:com.google.android.gms.internal.measurement.zzabn

原文由 Peter Haddad 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题