Unity3D and AAR

By : Malachi
Source: Stackoverflow.com

Has anyone found a good way to utilize Android .aar libraries within Unity3D, other than unzipping them?

Snippets from the Unity 4.2 Release Notes:

  • Android: Added support for Android Library Projects (no compilation support, so the libraries have to be pre-compiled).
  • Android: Remove Eclipse project support in favor of Android project support.
  • Android: Support for Android SDK rev22.

The Unity documentation clarifies

Pre-compiled means all .java files must have been compiled into jar files located in either the bin/ or the libs/ folder of the project.

I'm familiar with using the jar + res/ solution; but I am specifically trying to identify the best way of incorporating the precompiled aar. Is there something better than unzipping it?

By : Malachi

With Unity 5, just place .aar files in the project. (They don't even need to be in /Plugins/Android anymore, just check the inspector and make sure they are turned on for Android platform).

This video can help you solving your question :)
By: admin