gpt4 book ai didi

android - 错误程序类型已存在 : com. google.common.util.concurrent.ListenableFuture

转载 作者:太空狗 更新时间:2023-10-29 13:02:47 26 4
gpt4 key购买 nike

我需要使用两个 Guava 类:

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

但是我在构建\重建项目时得到了这个:

Program type already present: com.google.common.util.concurrent.ListenableFuture
Message{kind=ERROR, text=Program type already present: com.google.common.util.concurrent.ListenableFuture, sources=[Unknown source file], tool name=Optional.of(D8)}

这是我的 build.gradle 文件:

我也试着写排除,但也许我做错了?

我尝试删除 crashlytics 日志,尝试删除 gms-services,但没有任何帮助

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://jitpack.io' }
mavenCentral()
jcenter()
}
android {
useLibrary 'org.apache.http.legacy'
lintOptions {

checkReleaseBuilds false

}
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
compileSdkVersion 27
defaultConfig {
applicationId "com.jinga.updater"
minSdkVersion 26
targetSdkVersion 27
versionCode 16
versionName "2.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
def archLifecycleVersion = '1.1.1'
def room_version = "1.1.1"
def versions_work = "1.0.0-alpha09"


implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.novoda:merlin:1.1.7'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'

implementation 'com.android.support:design: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 'io.reactivex.rxjava2:rxandroid:2.0.2'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation group: 'com.google.guava', name: 'guava', version: '23.5-android'

implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"

// Room components
androidTestImplementation "android.arch.persistence.room:testing:$room_version"

// Lifecycle components
implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"



implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-messaging:17.3.1'

implementation group: 'commons-io', name: 'commons-io', version: '2.5'

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
implementation 'com.android.support:recyclerview-v7:27.1.1'

implementation 'com.yandex.android:mobmetricalib:3.2.2'

implementation 'com.github.nkzawa:socket.io-client:0.3.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:cardview-v7:27.1.1'
//circleImage
implementation 'com.orhanobut:dialogplus:1.11@aar'

implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
implementation "android.arch.work:work-runtime:$versions_work"

}

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

我应该怎么做才能解决这个问题,我在工作管理器的堆栈上看到了一些示例,但它们对我没有帮助

最佳答案

我遇到了同样的问题,原因是:我正在使用这个库:

implementation "android.arch.persistence.room:guava:1.1.1"

我不知道为什么,它返回给我一个和你一样的错误,但尝试删除它并找到另一个解决方案

关于android - 错误程序类型已存在 : com. google.common.util.concurrent.ListenableFuture,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53217854/

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