How to use JarJar with Android to change package names of external jars?
Asked Answered
T

1

8

I can't seem to find any clear instructions on how to use JarJar with an Android project.

I've got a scenario where my application project relies on two separate libraries, which both happen to use the same external .jar files. If I try to compile the application I get "Conversion to Dalvik format failed with error 1".

Can someone show me how to user JarJar on Android, using the build.xml file, in order to change the package name of a thirdparty .jar folder?

Trost answered 26/10, 2012 at 13:52 Comment(11)
+1 for "eternal jars" from a "Sentinel" :DDuplet
I actually wrote "external" not "eternal", but I appreciate the +1 none the less. :)Trost
The title say "eternal jars" :DDuplet
Ah, now that I didn't check. Thank you!Trost
got such a similar case. Did you solve it?Parley
Yea, we did solve it in the end. I'll post up my solution asap.Trost
@Sent1nel, plz post your solution.Fort
@Trost What was the solution?Glance
@Sent1nel: Please share your solution.Dolf
@Sent1nel: Please do share your solution.Lunik
There is a working example here github.com/vRallev/jarjar-gradle/tree/master/android-demoAmbulacrum
W
-7

Try it by following these steps:

  1. firstly you copy own jar file on your project within a folder.
  2. Now you go to your project , right click on your project and click to bulid path- again choose configure build path ,
  3. Now you select libraries and select external jar file , after browse your jar folder, select those jar file.
  4. click finish
Wexler answered 26/10, 2012 at 13:59 Comment(1)
Thanks for the response, but this is not what I'm looking for unfortunatly. I'm trying to prevent .jar files from seperate Android libraries from conflicting. What you've shown is how to add an external .jar to an Android project.Trost

© 2022 - 2024 — McMap. All rights reserved.