程序类型已经存在:com.google.android.gms.common.api.zzf [英] Program type already present: com.google.android.gms.common.api.zzf
问题描述
当我在android studio中运行应用程序时,出现以下错误.
When I run my application in the android studio, I get the following error.
程序类型已存在:com.google.android.gms.common.api.zzf
Program type already exists: 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).
firebase-core warning -> All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 12.0.1, 10.0.1. Examples include com.google.android.gms:play-services-basement:12.0.1 and com.google.android.gms:play-services-ads:10.0.1 less... (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your 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'
推荐答案
我的解决方案
implementation ('com.facebook.android:audience-network-sdk:4.28.0',{
exclude group: 'com.google.android.gms'
})
这篇关于程序类型已经存在:com.google.android.gms.common.api.zzf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!