我正在尝试将Google Speech API用于一个项目,但是在将输入音频传递到API时会卡住。我不断收到错误消息:
错误:程序类型已经存在:com.google.common.annotations.VisibleForTesting
这是我的Gradle依赖项代码:-
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.apis:google-api-services-speech:v1beta1-rev336-1.22.0'
implementation 'com.google.apis:google-api-services-language:v1beta2-rev6-1.22.0'
implementation 'com.google.code.findbugs:jsr305:2.0.1'
implementation 'commons-io:commons-io:2.5'
implementation 'com.google.cloud:google-cloud-speech:0.61.0-beta'
implementation 'com.google.apis:google-api-services-tasks:v1-rev52-1.23.0'
implementation('com.google.api-client:google-api-client-android:1.23.0') {
exclude module: 'guava-jdk5'
}
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'
}
我已经使用StackOverflow上的建议修复了以前的同类错误,但似乎没有解决方案。预见到此类错误,我有什么办法判断要排除哪个“模块”?
谢谢!