我正在使用Android Gradle:3.0.0-beta-6,自从我包含Google翻译API以来,它抛出了以下错误。
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task
':app:transformResourcesWithMergeJavaResForDebug'.
More than one file was found with OS independent path 'project.properties'这是我的依赖项
dependencies {
annotationProcessor 'com.google.auto.value:auto-value:1.2'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
api 'com.twitter.sdk.android:twitter-core:3.1.1'
api 'com.google.cloud:google-cloud-translate:1.6.0'
}我如何修复这个错误,以及为什么会发生这种情况,因为我详尽地搜索了34个小时,却没有得到任何解释。
发布于 2017-11-15 23:56:40
你有没有试过把它添加到你的build.gradle中?
android {
...
packagingOptions {
exclude 'META-INF/project.properties'
}
}https://stackoverflow.com/questions/46431090
复制相似问题