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

Rename attrs #10

Closed
cakcaraka opened this issue Apr 30, 2018 · 5 comments
Closed

Rename attrs #10

cakcaraka opened this issue Apr 30, 2018 · 5 comments

Comments

@cakcaraka
Copy link

Hi, first thanks for creating such an awesome library.

Is it possible to change the attribute names so it won't collide with other libraries? (like adding ticketview_ or ticket as a prefix(like the ticketElevation?)

I want to use this library but currently it attributes collides with other libraries i am using. (in my case the orientation resource name has conflicts)

AGPBI: {"kind":"error","text":"Attribute "orientation" already defined with incompatible format.","sources":[{"file":"/Users/xxxx/.gradle/caches/transforms-1/files-1.1/{other-library-name}/f85a8ad0b0222b4a35fd6da2e9a9be73/res/values/values.xml","position":{"startLine":86,"startColumn":4,"startOffset":5685,"endColumn":51,"endOffset":5732}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Original attribute defined here.","sources":[{"file":"/Users/xxx/.gradle/caches/transforms-1/files-1.1/{other-library-name}/f85a8ad0b0222b4a35fd6da2e9a9be73/res/values/values.xml","position":{"startLine":86,"startColumn":4,"startOffset":5685,"endColumn":51,"endOffset":5732}}],"original":"","tool":"AAPT"}

Stating from here
https://developer.android.com/studio/projects/android-library

Resource merge conflicts
The build tools merge resources from a library module with those of a dependent app module. If a given resource ID is defined in both modules, the resource from the app is used.
If conflicts occur between multiple AAR libraries, then the resource from the library listed first in the dependencies list (toward the top of the dependencies block) is used.
To avoid resource conflicts for common resource IDs, consider using a prefix or other consistent naming scheme that is unique to the module (or is unique across all project modules).

@mtangoo
Copy link

mtangoo commented Oct 8, 2018

I get something that I guess is caused by same issue

duplicate value for resource 'attr/showDivider' with config ''.

@mtangoo
Copy link

mtangoo commented Oct 8, 2018

I just downloaded the library and changed the conflicting attribute name and it worked fine
I will see if I can get time to rename stuffs and make PR

@vipulasri
Copy link
Owner

@mtangoo @cakcaraka This issue is solved in the latest release i.e v1.0.7.

@mtangoo
Copy link

mtangoo commented Oct 21, 2018

Great news. I'll test it soon

@mtangoo
Copy link

mtangoo commented Oct 21, 2018

@vipulasri it works just fine. Thanks for the fix!

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

3 participants