Monday, 9 September 2013

Android build fail in eclipse with a dx error when exporting maven dependencies

Android build fail in eclipse with a dx error when exporting maven
dependencies

Run with command line works !
In command line mvn install android:deploy android:run works fine.
Run with Eclipse fails with dx error
I try to run my application with eclipse run as > Android Application
Then, it always fails with error
[2013-09-10 00:19:51 - facets-mvn-integ-test] Dx trouble processing
"javax/xml/namespace/QName.class":
My Eclipse configuration
I use the following pugin :
maven 3.0.4



http://i.stack.imgur.com/afZnG.png
(same binary I use in command line - but It also fails with eclipse
embedded one)
m2e 1.4.0 & android configurator for m2e 0.4.2



http://i.stack.imgur.com/Yz9Qk.png
Works when using private libraries instead of maven ...
If I dot not export Maven Dependencies I dot not have any dx error but I
obvously have ClassNotFoundException
Weird fact is that when I dot not export maven libraries but I put the
exact same jar un lib folder such as the libraries are exported with
Andrdoid private libarries, it works fine.
Works in Eclipse when I remove android dependency ...
I'll be digging but I could not find any solution : I read somewhere to
remove android dependency from pom. And it works in Eclipse ! But
obviously, it does not work anymore with command line.
Here is my actual pom dependecies conf
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
So if anybody has faced this problem any help will be really appreciated ..

No comments:

Post a Comment