Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Duplicate resources #102

Closed
JirkaKrivanek opened this issue Dec 10, 2019 · 6 comments
Closed

Error: Duplicate resources #102

JirkaKrivanek opened this issue Dec 10, 2019 · 6 comments

Comments

@JirkaKrivanek
Copy link

Hello, I have an issue with using your plugin. I am aware that it is NOT your fault at all. The multiple binary AARs I am trying to merge do contain the "string/app_name". This is of course pointless for the AAR. But I am unable to force the authors of those AARs to behave properly: Any chance you allow to solve the merge conflicts somehow?

The full error is like this (one of many):

[string/app_name] 
    /Volumes/Gemalto/MBISDK/MBISDK/Public/MbiSdkLibrary/build/intermediates/exploded-aar/fr.coppernic.sdk.cpcutils/CpcUtilsLib/6.18.1/debug/res/values/values.xml	
[string/app_name] 
    /Volumes/Gemalto/MBISDK/MBISDK/Public/MbiSdkLibrary/build/intermediates/exploded-aar/com.gemalto.sprng/sprng/2.0.0/debug/res/values/values.xml: 
    Error: Duplicate resources
@kezong
Copy link
Owner

kezong commented Dec 10, 2019

  • Res merge conflicts. If the library res folder and embedded dependencies res have the same res Id(mostly string/app_name). A duplicate resources build exception will be thrown. To avoid res conflicts:
    • Consider using a prefix to each res Id, both in library res and aar dependencies if possible.
    • Adding android.disableResourceValidation=true to gradle.properties can do a trick to skip the exception.

@JirkaKrivanek
Copy link
Author

As I wrote, I can hardly impact those dependencies. Of course, for our dependencies, your advice is valid.

But the "android.disableResourceValidation=true" did the trick for me, so I can at least continue investigating whether your merger works for me or not...

Thank You, closing this ticket now...

@kezong kezong added good first issue Good for newcomers and removed good first issue Good for newcomers labels Dec 13, 2020
@kezong kezong pinned this issue Dec 14, 2020
@louiewh
Copy link

louiewh commented Mar 4, 2021

I also have this issure.
So any other good way to reslove ?

@jaceDeng
Copy link

我也有同样的问题。提示
Duplicate resources
是2个aar 包里面so文件相同了 这个能不能加给配置 类似
packagingOptions {
pickFirst 'lib/*/libc++_shared.so'
}
因为我清楚知道这2个so 文件是一致的 或者后面如果能够md5比对如果相同则保留一个

@cm1996
Copy link

cm1996 commented Nov 24, 2021

我也有同样的问题。提示 Duplicate resources 是2个aar 包里面so文件相同了 这个能不能加给配置 类似 packagingOptions { pickFirst 'lib/*/libc++_shared.so' } 因为我清楚知道这2个so 文件是一致的 或者后面如果能够md5比对如果相同则保留一个

请问解决了么,我这也是 so 库冲突,只希望随便选一个就行

@ACMNexus
Copy link

How to solve the asset sample resource file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants