Java – Android / gradle / unity – contains all dependencies in the AAR plug-in

I want to build a plug-in to wrap unity's latest Google cloud messaging API (GCM) I wrote java code to implement it and included the GCM plug-in in my gradle build:

compile 'com.google.android.gms:play-services-gcm:7.5.0'

Since the goal is unity, I need to create AAR or jar resources to be included in assets / plugins / Android, and they need to include all pass through dependencies (including appcompat and play service itself) If I compile the application with AAR in unity, I get:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;

This is normal because AAR does not contain dependent Google play classes And I can't find a separate jar for the GCM module I'm lost. What do I need to get an AAR / jar that bundles all my dependencies?

Thank you in advance!

Solution

AFAIK you need from your plugin Remove LIBS / classes. From AAR jar

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>