0
votes

please help with this error

apply plugin: 'com.android.application'

android { compileSdkVersion 28 defaultConfig { applicationId "com.zeedapp.get_message_info" minSdkVersion 17 targetSdkVersion 28 versionCode 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:[email protected]'
implementation 'io.grpc:grpc-protobuf-lite:1.18.0'
implementation 'io.grpc:grpc-okhttp:1.18.0'

Error: Program type already present: com.google.firebase.iid.FirebaseInstanceId

1
show your " classpath 'com.google.gms:google-services" – Mohammod Hossain

1 Answers

0
votes
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'        

         }

For more info go to the following link https://firebase.google.com/docs/android/setup