I had this issue with Install Referrer and ARCore (both from Google!)
I wasn't able to get ShadowJar working with an aar
library (which contains a classes.jar
). Maybe there's some way to do it, but I couldn't figure it out.
Instead, I downloaded and unzipped the aar, used jarjar to rename the offending class in classes.jar
, and zipped it back into an aar
. Then I put my modified aar
file in my libs
directory and modified my dependency to reference that local file instead of a maven library.
More detailed explanation:
To fix the classes.jar, I renamed it to classes-original.jar, created a jarjar.rules
file containing:
rule a.a.a relocated-a.a.a
and ran:
java -jar jarjar-1.4.jar process jarjar.rules classes-original.jar classes.jar