Android Studio-程序类型已存在:com.google.android.gms.internal.measurement.zzwp [英] Android Studio- Program type already present: com.google.android.gms.internal.measurement.zzwp

查看:90
本文介绍了Android Studio-程序类型已存在:com.google.android.gms.internal.measurement.zzwp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,我的应用程序工作正常。

Yesterday,my app was working fine.

今天,我不知道为什么,我重新打开Android Studio后应用程序不再编译。

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

显示的错误是

Program type already present: com.google.android.gms.internal.measurement.zzwp
Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.measurement.zzwp, sources=[Unknown source file], tool name=Optional.of(D8)}

我真的不知道发生了什么,我我搜索了一切,没有任何效果。
如果有人可以帮助我,我真的很感激。
我更改所有依赖项和库以尝试解决它,但没有任何效果。

I really don't know what's going on, I've searched everything and nothing worked. If someone could help me, I would really appreciate. I change all dependencies and libraries to try to solve it, but nothing worked.

这是build.gradle项目

Here is build.gradle Project

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        classpath 'com.google.gms:google-services:3.2.1'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这是我的build.gradle模块: app

And this is my build.gradle Module:app

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.doctordirectory"
        minSdkVersion 21
        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'
        }
    }
}

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    implementation fileTree(dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'

    implementation ('com.facebook.android:audience-network-sdk:4.28.0',{
        exclude group: 'com.google.android.gms'
    })
    implementation 'com.facebook.android:facebook-login:4.32.0'
    implementation 'com.android.support:multidex:1.0.3'

    implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'

    implementation 'com.android.support:support-v4:27.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:15.0.0'
    implementation 'com.google.firebase:firebase-database:15.0.0'
    implementation 'com.google.firebase:firebase-crash:15.0.0'
    implementation 'com.google.firebase:firebase-auth:15.0.0'
    implementation 'com.google.firebase:firebase-storage:15.0.0'
    implementation 'com.firebaseui:firebase-ui-database:3.3.1'

    implementation 'com.google.android.gms:play-services-auth:15.0.0'
    implementation 'com.google.android.gms:play-services-plus:15.0.0'
    implementation 'com.google.android.gms:play-services-location:15.0.0'

    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.0'

    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

    implementation 'com.stepstone.apprating:app-rating:2.2.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.github.lguipeng:BubbleView:1.0.1'

    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'

    implementation 'com.miguelcatalan:materialsearchview:1.4.0'

    implementation 'com.github.MdFarhanRaja:SearchableSpinner:1.9'

    implementation 'com.github.sillebille:dynamic-calendar:1.0.1'

    implementation 'com.google.api-client:google-api-client:1.22.0'
    implementation 'com.google.api-client:google-api-client-android:1.22.0'
    implementation 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
}

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


推荐答案

更新 firebase依赖项后解决了此问题最新的例如 com.google.firebase:firebase-core:15.0.0 com.google.firebase:firebase-core:15.0。 2 从此处获取最新列表

Resolved this issue after updating a firebase dependencies to latest one for example com.google.firebase:firebase-core:15.0.0 to com.google.firebase:firebase-core:15.0.2 Get Latest List from here

以下列表中的所有其他更改

All other changes made in below list

  dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:customtabs:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.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.github.PhilJay:MPAndroidChart:v3.0.3'

        implementation 'com.facebook.android:audience-network-sdk:4.28.0'
        implementation 'com.facebook.android:facebook-login:4.32.0'
        implementation 'com.android.support:multidex:1.0.3'

        implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'

        implementation 'com.android.support:support-v4:27.1.1'
        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:15.0.2'
        implementation 'com.google.firebase:firebase-database:15.0.0'
        implementation 'com.google.firebase:firebase-crash:15.0.2'
        implementation 'com.google.firebase:firebase-auth:15.0.0'
        implementation 'com.google.firebase:firebase-storage:15.0.2'
        implementation 'com.firebaseui:firebase-ui-database:3.3.1'

        implementation 'com.google.android.gms:play-services-auth:15.0.0'
        implementation 'com.google.android.gms:play-services-plus:15.0.0'
        implementation 'com.google.android.gms:play-services-location:15.0.0'

        implementation 'com.android.support:cardview-v7:27.1.1'
        implementation 'com.android.support:recyclerview-v7:27.1.1'

        implementation 'com.squareup.picasso:picasso:2.5.2'
        implementation 'com.squareup.retrofit2:retrofit:2.3.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

        implementation 'com.stepstone.apprating:app-rating:2.2.0'
        implementation 'com.android.support:design:27.1.1'
        implementation 'com.github.lguipeng:BubbleView:1.0.1'

        implementation 'uk.co.chrisjenx:calligraphy:2.3.0'

        implementation 'com.miguelcatalan:materialsearchview:1.4.0'

        implementation 'com.github.MdFarhanRaja:SearchableSpinner:1.9'

        implementation 'com.github.sillebille:dynamic-calendar:1.0.1'

        implementation 'com.google.api-client:google-api-client:1.22.0'
        implementation 'com.google.api-client:google-api-client-android:1.22.0'
        implementation 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
    }

2)在顶级build.gradle文件中更新
classpath'com.google.gms:google-services:3.1.1 classpath'c om.google.gms:google-services:3.2.1

2) In top level build.gradle file update from classpath 'com.google.gms:google-services:3.1.1 to classpath 'com.google.gms:google-services:3.2.1

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

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆