Table of Contents
In order for Tapjoy sdk to work it is not necessary to include the entire GPS library. The only jar file that is required is the google-play-services-basement.jar.
As of 11.4 Tapjoy sdk contains an approximate of 800 methods. Listed below are a couple of options to dealing with scenarios where your app might be approaching the 65k method count.
a.) Remove Entire GPS library and only use play-services-basement.
Android Studio Remote Dependency Library Option
If using Android Studio with remote dependency libraries then use the following in the build.gradle
compile fileTree(dir: 'libs', include: ['*.jar'])
Android Studio Jar file Option
If you want to remove GPS from an existing project and just use the jar then here are the steps required.
Removing GPS from an existing project to just include google-play-services-basement.jar. For example the out of the box Tapjoy EasyApp sample includes the entire GPS library. Listed below are the steps showing how to remove this and just use the required google-play-services-basement.jar.
Remove references to GPS in the following locations
1.) Settings.gradle – showing commented out include.
2.) project.properties.- showing commented out reference to GPS
3.) Remove from reference of gps in the build.gradle and add the google-play-services-basement.jar’ jar file.
compile fileTree(include: '*.jar', dir: 'libs')
// compile project(':Libraries:google-play-services_lib')
4.) AndroidManifest.xml. showing commented out reference to GPS
b.) Include multi-dex support.
Another method is to include an entry into the gradle.build that allows for multidex support. See the following link for more details on this.
Here are a couple of links on the Unity forums that talk about workarounds for this issue.
Unity has an option to create an android project instead of .apk. Then you can make the modifications suggested above.