web-dev-qa-db-ja.com

「OSに依存しないパス 'project.properties'で複数のファイルが見つかりました」を修正する方法Android Studio 3.0 Beta-6

Android Gradle:3.0.0-beta-6を使用していますが、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'

これは私の依存関係です

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時間にわたって徹底的に検索しましたが、説明が得られなかったために、なぜこれが正確に発生しているのですか。

3
user8661677

これをbuild.gradleに追加してみましたか?

Android {
    ...
    packagingOptions {
        exclude 'META-INF/project.properties'
    }
}
2
Bernardo Rocha