程序类型已存在:com.google.android.gms.internal.zzfq

Program type already present: com.google.android.gms.internal.zzfq(程序类型已存在:com.google.android.gms.internal.zzfq)
本文介绍了程序类型已存在:com.google.android.gms.internal.zzfq的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我收到此错误.尽管尝试了所有事情,但我无法解决它.请帮我.

I getting this error. Despite trying all thing I am unable to resolve it. Please help me.

我尝试过的事情是:

  1. 删除 .build.idea 等然后重建
  2. 清理和重建
  3. 修改编译库版本

谢谢

插件

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'

安卓

android {
dexOptions {
    preDexLibraries = false
    javaMaxHeapSize "2g"
}

compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "com.funzone.alarmnap"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    multiDexEnabled true
    versionName "1.1"
    vectorDrawables.useSupportLibrary = true
    testInstrumentationRunner 
    "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
   }

绿道插件

 apply plugin: 'org.greenrobot.greendao'
 greendao {
   targetGenDir 'src/main/java'
   schemaVersion 2
 }

所有库:

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.jjoe64:graphview:4.2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.facebook.android:audience-network-sdk:4.+'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:notifications:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'org.greenrobot:greendao:3.2.2'
testImplementation 'junit:junit:4.12'
testImplementation "org.robolectric:shadows-multidex:3.0"
testImplementation 'org.robolectric:robolectric:3.4.2'
implementation 'com.android.support:preference-v7:27.1.0'
}




repositories {
mavenCentral()
google()
}

谷歌插件

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

推荐答案

我在我的项目中修复了同样的问题 - 在将 Kotlin 插件更新到 1.2.41 之后(我不知道它是否真的相关.显然这与 Kotlin 无关) - 与:

I fix the same issue in my project - after updating the Kotlin plugin to 1.2.41 (I don't know if it is really related. apparently this is not related with Kotlin) - with :

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

https://developers.google.com/android/guides/google-服务插件

备注:我可以使用唯一的 15.0.0 Google Play 服务库版本,但不能使用 play-services-tagmanager 版本,并且firebase:

Remark: I could stay with the unique 15.0.0 Google Play Services libraries version but not the play-services-tagmanager one and firebase :

implementation "com.google.android.gms:play-services-tagmanager:15.0.2"
implementation "com.google.firebase:firebase-core:15.0.2"

项目正在编译中.

这篇关于程序类型已存在:com.google.android.gms.internal.zzfq的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum(Android 发布 APK 因 java.lang.AssertionError 崩溃:在 java.lang.Enum 中不可能)
Finished with Non Zero Exit Value 3(以非零退出值 3 结束)
On gradle:3.0.0 More than one file was found with OS independent path #39;META-INF/ASL2.0#39;(在 gradle:3.0.0 上找到多个文件,其独立于操作系统的路径为“META-INF/ASL2.0)
Android : app loading library at runtime on Lollipop but not IceCreamSandwich(Android:运行时在 Lollipop 上而不是 IceCreamSandwich 上的应用程序加载库)
buildConfigField depending on flavor + buildType(buildConfigField 取决于风味 + buildType)
How do I suppress warnings when compiling an android library with gradle?(使用 gradle 编译 android 库时如何抑制警告?)