How to support .aar lib as references in android project?

How to support third party .aar libraries as references in android project?

1 Like

For now just extract the .aar files somewhere and reference the jar file (s) directly.

If the .aar contains resources that the embedded jar needs, how will that work? I’m trying to use Mike Penz’s MaterialDrawer library. Have extracted the jar but there are numerous layout, color, style, etc. files.

I tried putting the JAR in the local project and the resources in a linked project since there are so many but spinning my wheels trying to get the project to compile. From your comment @ck is this planned for a future build?

Since that didn’t work, I moved everything into my project, so now have a reference to the JAR, and locally held copies of the dependent res files. The JAR is trying to reference a specific layout file and so the app abends with

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mikepenz/materialdrawer/R$layout;

Thanks, logged as bugs://74120

We’ll take a look yes.

Thanks @ck. In the meantime, is there any workaround? In Eclipse I could just break apart the project and recompile the Java, but in RemObjects I’d have to convert all the code to Swift to then be converted back to Java?

It’s not the java code that it has a problem with. It seems it doesn’t link in the resources. The weird thing is that extracting should have worked too. All elements wants is a directory like:

adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib

So that libs</b> has the relevant jar files, and res the resources.

OK, if you think it should work I’ll have another attempt. Quite possible I did something wrong.

J.

bugs://74120 got closed with status fixed.