gpt4 book ai didi

java - 错误 : Type com. google.android.gms.common.internal.zzg 被引用为来自 `com.google.android.gms.internal.zzij` 的接口(interface)

转载 作者:行者123 更新时间:2023-11-29 07:25:52 26 4
gpt4 key购买 nike

我尝试在更新 android studio 3.2.1 后修复我的应用程序的一些功能。但似乎我得到了更多的错误。当我尝试重建应用程序时。我收到了这个信使:

Error: Type com.google.android.gms.common.internal.zzg is referenced as an interface from `com.google.android.gms.internal.zzij`.

但是,我的 build.gradle (Module:app) 和 build.gradle (Project) 看起来不错。这是我的 build.gradle :

apply plugin: 'com.android.application'

android {
compileSdkVersion 28

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "com.xx.xx"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled = true
versionCode 7x
versionName "1.0.7x"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
lintOptions {
checkReleaseBuilds false
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation files('libs/json_simple-1.1.jar')
implementation('com.omertron:themoviedbapi:4.2') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude module: 'junit'
}
implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/okhttp-3.8.1.jar')
implementation files('libs/okio-1.13.0.jar')
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.guava:guava:24.1-jre'
//noinspection UseOfBundledGooglePlayServices
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.googlecode.libphonenumber:libphonenumber:7.3.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
implementation 'javax.mail:mail:1.5.0-b01'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'

implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.github.orangegangsters:swipy:1.2.3@aar'
implementation 'io.michaelrocks:libphonenumber-android:8.9.0'
implementation 'com.github.joielechong:countrycodepicker:2.1.5'
testImplementation 'junit:junit:4.12'
implementation files('libs/xxx.jar')
}

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

还有,这里是我的 build.gradle(项目):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {

google()
jcenter()
maven { url "https://jitpack.io" }

}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
}
}

allprojects {
// apply plugin: 'com.android.application'
repositories {
maven {
url "https://maven.google.com"
}
google()
jcenter()

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

}
}

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

我尝试为这个问题找到一些解决方案。但我什么也没找到。那么,有人可以帮助我吗?

最佳答案

您可能需要删除 implementation 'com.google.android.gms:play-services:12.0.1'

并将其替换为

 implementation("com.google.android.gms:play-services-gcm:12.0.1") {
exclude group: "com.google.android.gms"
}

之前enter image description hereenter image description here 之后

关于java - 错误 : Type com. google.android.gms.common.internal.zzg 被引用为来自 `com.google.android.gms.internal.zzij` 的接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53001532/

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