I want to create a plugin to port the latest Google Cloud Messaging API (GCM) for Unity. I wrote Java code for this and included the GCM plugin in my gradle construct:
compile 'com.google.android.gms:play-services-gcm:7.5.0'
Since the goal is Unity, I need to create either AAR or JAR + resources that will be included in Assets / Plugins / Android, and they need to include all transitive dependencies (including appcompat and the game services themselves). If I compile the application with my AAR from Unity, I get:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;
This is normal because AAR does not contain Google Play dependent classes. And I can not find a standalone JAR for GCM modules. I'm lost, what do I need to get an AAR / JAR with all the dependencies associated?
Thanks in advance!
source
share