错误:程序类型已存在:com.google.firebase.iid.FirebaseInstanceId

时间:2019-03-04 09:33:53

标签: java android gradle

请帮助解决此错误

apply plugin: 'com.android.application'

android {     编译版本28     defaultConfig {         applicationId“ com.zeedapp.get_message_info”         minSdkVersion 17         targetSdkVersion 28         版本代码1         versionName“ 1.0”         testInstrumentationRunner“ android.support.test.runner.AndroidJUnitRunner”

    javaCompileOptions {
        annotationProcessorOptions {
            includeCompileClasspath true
        }
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}
  dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-firestore:18.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-admin:6.7.0'

implementation 'io.grpc:grpc-auth:1.18.0'
implementation 'io.grpc:grpc-netty-shaded:1.18.0'
implementation 'io.grpc:grpc-android:1.18.0'
implementation 'io.grpc:grpc-stub@1.18.0'
implementation 'io.grpc:grpc-protobuf-lite:1.18.0'
implementation 'io.grpc:grpc-okhttp:1.18.0'

错误:程序类型已存在:com.google.firebase.iid.FirebaseInstanceId

1 个答案:

答案 0 :(得分:0)

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
    }
}

     dependencies {
          // ...
          implementation 'com.google.firebase:firebase-core:16.0.7'
          implementation 'com.google.firebase:firebase-firestore:18.1.0'        

         }

有关更多信息,请访问以下链接https://firebase.google.com/docs/android/setup