首页 文章

Firebase依赖项冲突找到com.google.firebase:firebase-core:.11.0.4,但需要版本11.0.4

提问于
浏览
0

问题是我需要Firebase版本11.0.4,但我有11.0.4 ...

这是我的构建脚本

ext {
    supportLibraryVersion = '25.3.1'
    playServicesVersion = '11.0.4'
    firebaseVersion = '11.0.4'
}

dependencies {
compile project(":core")
compile fileTree(dir: 'libs', include: ['*.jar'])

// support libraries
compile "com.android.support:support-v4:$supportLibraryVersion"
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:cardview-v7:$supportLibraryVersion"
compile "com.android.support:recyclerview-v7:$supportLibraryVersion"

//play services
compile "com.google.android.gms:play-services-maps:$playServicesVersion"
compile "com.google.android.gms:play-services-location:$playServicesVersion"
compile "com.google.android.gms:play-services-auth:$playServicesVersion"
compile "com.google.android.gms:play-services-plus:$playServicesVersion"

compile "com.google.firebase:firebase-core:.$firebaseVersion"
compile "com.google.firebase:firebase-messaging:$firebaseVersion"

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

Found com.google.firebase:firebase-core:.11.0.4, but version 11.0.4 is needed for the google-services plugin. :app:processDebugGoogleServices FAILED:app:processDebugGoogleServices(Thread [Daemon worker Thread 7,5,main])已完成 . 花了0.001秒 .

FAILURE:构建因异常而失败 .

  • 出了什么问题:任务':app:processDebugGoogleServices'执行失败 .

请通过更新google-services插件的版本来修复版本冲突(有关最新版本的信息,请访问https://bintray.com/android/android-tools/com.google.gms.google-services/ )或将com.google.android.gms的版本更新为11.0.4 .

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪 . 使用--debug选项运行以获取更多日志输出 .

我的谷歌播放服务版本是43,sugestions?

1 回答

  • 2
    compile "com.google.firebase:firebase-core:$firebaseVersion"
    

    /* 注意: . 被移除在上面的行* /

相关问题