【发布时间】:2018-04-08 13:34:02
【问题描述】:
当我在 android studio 中运行我的应用程序时,我收到以下错误。
程序类型已存在:com.google.android.gms.common.api.zzf
firebase-core 警告 -> 所有 gms/firebase 库必须使用确切的 相同的版本规范(混合版本可能会导致运行时 崩溃)。找到版本 12.0.1、10.0.1。例子包括 com.google.android.gms:play-services-basement:12.0.1 和 com.google.android.gms:play-services-ads:10.0.1 少... (Ctrl+F1) 有一些库或工具和库的组合,它们 不兼容,或者可能导致错误。一种这样的不兼容性是 使用不支持的 Android 支持库版本进行编译 最新版本(或者特别是低于您的 targetSdkVersion)。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.fay.flow"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
testImplementation 'junit:junit:4.12'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
implementation 'com.facebook.android:audience-network-sdk:4.28.0'
implementation 'org.jsoup:jsoup:1.7.3'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.r0adkll:slidableactivity:2.0.6'
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
implementation 'com.etsy.android.grid:library:1.0.5'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
试试这个解决方案:stackoverflow.com/a/49529205/7724032
-
不,还是一样。
标签: android firebase android-gradle-plugin