Android Studio- Program type already present: com.google.android.gms.internal.measurement.zzwp

前端 未结 14 1210
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 01:35

Yesterday,my app was working fine.

Today, I don\'t know why, the app didn\'t compile anymore after I reopened the Android Studio.

The error shown is

相关标签:
14条回答
  • 2020-11-30 02:00

    This happened with me after adding firebase analitycs last vesion, like this

    implementation "com.google.firebase:firebase-core:16.0.5"
    

    changing version to 16.0.4 helped

    implementation "com.google.firebase:firebase-core:16.0.4"
    
    0 讨论(0)
  • 2020-11-30 02:02

    Commenting out the following dependency fixed the issue for me:

    implementation 'com.google.android.gms:play-services-analytics::16.0.7'
    
    0 讨论(0)
  • 2020-11-30 02:05
    allprojects {
        repositories {
        //start here
        configurations.all {
     resolutionStrategy.eachDependency { DependencyResolveDetails details ->
       def requested = details.requested
           if (requested.group == 'com.google.android.gms') {
              details.useVersion '12.0.1'
           }
           if (requested.group == 'com.google.firebase') {
              details.useVersion '12.0.1'
             }
           }
         }
        //end
         jcenter()
           maven {
             url "https://maven.google.com"
           }
         }
     }
    
    0 讨论(0)
  • 2020-11-30 02:06

    I faced the same problem today. Google comes with the new release on 02 May 2018.

    Please go to the link and set the version no according to the doc:

    https://firebase.google.com/support/release-notes/android#20180502

    for e.g.

    Firebase Core com.google.firebase:firebase-core:15.0.2

    0 讨论(0)
  • 2020-11-30 02:13

    I just change

    implementation 'com.google.firebase:firebase-crash:15.0.0'
    

    to

    implementation 'com.google.firebase:firebase-crash:15.0.2'
    

    it works.

    0 讨论(0)
  • 2020-11-30 02:18

    Remove dependency that contains "com.google.android.gms" and then try to rebuild the project ...you have to do hit n try coz there is some dependency which uses twice there

    For example com.android.support:design added twise

    0 讨论(0)
提交回复
热议问题