Android same attribute name in two libs, name collision

fhucho

I'm using two 3rd party libs, both use the same attribute name in their attrs.xml. The build fails with:

Attribute "tabBackground" has already been defined

Is there a way to work around this collision without modifying the argument name in one of the libs?

Sergey Shustikov

Actually no.

I suppose you have a dependency from A project to B.

When you build your main project in Eclipse, the resources will fail to build and an error is printed out in the Android console: "... error: Attribute "icon" has already been defined".

Actually you have two ways :

  • remove dependency from A project to B
  • OR change attribute name of some project

Also if you build project with Gradle you can use this article which explains how to merge resources.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related