Unity Jar Resolver

Many Unity plugins have dependencies upon Android specific libraries, iOS CocoaPods, and sometimes have transitive dependencies upon other Unity plugins. This causes the following problems:

  • Integrating platform specific (e.g Android and iOS) libraries within a Unity project can be complex and a burden on a Unity plugin maintainer.
  • The process of resolving conflicting dependencies on platform-specific libraries is pushed to the developer attempting to use a Unity plugin. The developer trying to use your plugin is very likely to give up when faced with Android or iOS-specific build errors.
  • The process of resolving conflicting Unity plugins (due to shared Unity plugin components) is pushed to the developer attempting to use your Unity plugin. In an effort to resolve conflicts, the developer will very likely attempt to resolve problems by deleting random files in your plugin, report bugs when that doesn't work and finally give up.

The Play Services Resolver plugin (the name comes from its origin of just handling Google Play Services dependencies on Android) provides solutions for each of these problems.

Get the latest unity-jar-resolver here.

Using With Android Native

Android Native is shipped with all required libraries inside. We should also say that all those libraries will remain disabled until you enable the API  that requires a specific library to be installed as part of a build.

Long story short, you do not have to use the Unity jar resolver with Android Native plugin. However, from the previous chapter, you already understand how convenient it may be for the unity android development in general. 

Once you enabled jar resolver support inside the Android Native plugin setting it will uninstall all libraries it shipped with and will only generate dependencies for the jar resolver to resolve. The generate dependencies are located inside the AN_Dependencies.xml file if any. Otherwise, the dependencies file will not be created at all.

Once you are ready to start using a Unity Jar Resolver addon, just enable resolver support inside the plugin settings tab. As you may already know ANP will updates / generates required resources with build pre-processes if need.  But you may trigger resources update by hiting the "Start API Resolvers" button. See the screenshot below.

Known Issues

The jar resolver is the third-party solution under a MIT license. So if you going to use it, you should be aware of it. I will be adding here user reports/solutions due to using Jar resolver in the project.

Xcode Linker error 

Resolver generates an *.xcworkspace project file for XCode, if you'll use the default project file, you will get a linker error.