How to fix “More than one file was found with OS independent path 'project.properties'” Error in Android Studio 3.0 Beta-6

匿名 (未验证) 提交于 2019-12-03 01:05:01

问题:

I am using Android Gradle:3.0.0-beta-6 and it throws the following Error ever since I included Google Translation 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' 

This is my dependencies

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' } 

How can I fix this error and why exactly this is happening because I searched exhaustively for last 34 hrs and I didn't get an explanation.

回答1:

Have you tried adding this to your build.gradle?

android {     ...     packagingOptions {         exclude 'META-INF/project.properties'     } } 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!