首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用转换接口后出错

使用转换接口后出错
EN

Stack Overflow用户
提问于 2018-10-21 19:24:50
回答 1查看 138关注 0票数 1

build.gradle

代码语言:javascript
复制
  apply plugin: 'com.android.application'
 android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
    applicationId "com.example.speakplease"
    minSdkVersion 16
    targetSdkVersion 28
    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')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation ('com.google.apis:google-api-services-translate:v2-rev47- 
1.22.0')
implementation 'com.google.cloud:google-cloud-translate:0.5.0'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
compileOnly 'com.google.dagger:dagger-parent:2.9'
//noinspection GradleDependency
annotationProcessor 'com.google.auto.value:auto-value:1.2'
}
apply plugin: 'com.google.gms.google-services'

我已经导入了谷歌翻译api,在那之后,我开始得到注释错误。我可以解决它,但不能得到这个错误。我意识到一些依赖是冲突的,但无法找到。

这就是错误。

代码语言:javascript
复制
   Program type already present: 
 com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream
  Message{kind=ERROR, text=Program type already present: 
 com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream, 
  sources=[Unknown source file], tool name=Optional.of(D8)}
EN

回答 1

Stack Overflow用户

发布于 2018-10-21 19:53:37

这就是当你的两个依赖项包含相同的依赖项时发生的事情。查看this question,了解如何查看导致问题的依赖项。

我也遇到过同样的问题,对我来说,它是ExoPlayer,因为它包含在我正在使用的第三方库中,而且我自己也包含了它。

我不知道哪两个对你来说是冲突的,但这两个似乎是可疑的“相关”:

代码语言:javascript
复制
implementation ('com.google.apis:google-api-services-translate:v2-rev47-1.22.0')
implementation 'com.google.cloud:google-cloud-translate:0.5.0'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52914793

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档