错误:程序类型已存在:com.google.common.annotations.Beta [英] Error: Program type already present: com.google.common.annotations.Beta

查看:31
本文介绍了错误:程序类型已存在:com.google.common.annotations.Beta的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我的 android studio 几天前更新后,由于这个错误,我一直在努力让我的应用程序再次运行.

Since my android studio updated a couple of days ago, I have been struggling to get my application running again due to this error.

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

这是我的 build.gradle:

Here is my build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.dissertation.bitcoin.bitparking"
    minSdkVersion 21
    targetSdkVersion 27
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
   }
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.android.support:appcompat-v7:27.1.0')
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.http-client:google-http-client-android:1.23.0'
implementation 'com.google.api-client:google-api-client-android:1.23.0'
implementation 'com.google.code.findbugs:jsr305:2.0.1'
implementation 'com.google.api-client:google-api-client-gson:1.23.0'
implementation 'com.googlecode.json-simple:json-simple:1.1'
implementation files('libs/java-json.jar')
implementation 'com.android.support:support-compat:27.1.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google:bitcoinj:0.11.3'
implementation 'de.schildbach.wallet:integration-android:2.0'
}

上周这段代码对我来说运行良好.但是,由于我对 android 开发还很陌生,所以我可能忽略了一些东西.任何帮助将不胜感激,谢谢.

This code was working fine for me last week. However as I am fairly new to android development, I may have overlooked something. Any help would be appreciated, thank you.

推荐答案

只需尝试将 exclude module: 'guava-jdk5' 添加到 google api 导入中,如下所示:

Just try add exclude module: 'guava-jdk5' to google apis imports like this:

implementation('com.google.api-client:google-api-client-android:1.20.0') {
    exclude module: 'guava-jdk5'
}

这篇关于错误:程序类型已存在:com.google.common.annotations.Beta的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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