gpt4 book ai didi

Android Studio-程序类型已经存在 : com. google.android.gms.internal.measurement.zzwp

转载 作者:IT老高 更新时间:2023-10-28 13:09:33 70 4
gpt4 key购买 nike

昨天,我的应用运行良好。

今天不知道为什么,我重新打开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)}

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

这里是 build.gradle 项目

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

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.0com.google)后解决了这个问题.firebase:firebase-core:15.0.2 Get Latest List from here

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

  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.1classpath 'com.google.gms:google-services:3.2.1

关于Android Studio-程序类型已经存在 : com. google.android.gms.internal.measurement.zzwp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50146640/

70 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com