'错误:资源重复'将Google开源通知更新为0.9.2后

时间:2018-04-11 10:41:51

标签: android android-studio

我已将com.google.gms:oss-licenses更新为版本0.9.2,现在Android Studio在构建项目时出现以下错误:

[raw/third_party_license_metadata] /Users/<name>/AndroidStudioProjects/<project>/app/build/generated/third_party_licenses/res/raw/third_party_license_metadata  [raw/third_party_license_metadata] /Users/<name>/AndroidStudioProjects/<project>/app/src/main/res/raw/third_party_license_metadata: Error: Duplicate resources
[raw/third_party_licenses] /Users/<name>/AndroidStudioProjects/<project>/app/build/generated/third_party_licenses/res/raw/third_party_licenses  [raw/third_party_licenses] /Users/<name>/AndroidStudioProjects/<project>/app/src/main/res/raw/third_party_licenses: Error: Duplicate resources

1 个答案:

答案 0 :(得分:16)

Google Open Source Licenses Notices插件更改了保存这两个文件的路径 (third_party_license_metadatathird_party_license

旧:
<project-root>/app/src/main/res/raw/

新:
<project-root>/app/build/generated/third_party_licenses/res/raw/

您可以安全地删除旧文件夹中的这两个文件。