android - Extract GCM from google play services using proguard -


you don't have wanted to, it's simplier, answer below!

i want extract gcm google play services using proguard (i've run out of 65k method limit, i dont want to split dex file). i'm not able rid of exception:

java.lang.noclassdeffounderror: com.google.android.gms.r$string 

here proguard config:

-injars  sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar -outjars google-play-services-push.jar  -libraryjars sdk/extras/android/support/v4/android-support-v4.jar -libraryjars sdk/platforms/android-21/android.jar  -verbose -forceprocessing -dontoptimize -dontobfuscate -dontwarn com.google.**.r -dontwarn com.google.**.r$* -dontnote  -keep public class com.google.android.gms.common.** {     public protected *; }  -keep public class com.google.android.gms.gcm.** {     public protected *; }  -keep class com.google.android.gms.common.internal.safeparcel.safeparcelable {     java.lang.string null; }  -keepnames @com.google.android.gms.common.annotation.keepname class * -keepclassmembernames class * {     @com.google.android.gms.common.annotation.keepname *; }  -keepnames class * implements android.os.parcelable {     public static final ** creator; }  -keep class * extends java.util.listresourcebundle {     protected object[][] getcontents(); }  -keepattributes innerclasses  -keep class **.r -keep class **.r$* {     <fields>; } 

based on https://www.saikoa.com/files/media/proguard_droidconlondon2014.pdf + tries keep string resource.

it's not required nowadays since can split google play servies separate packages

example:

google account login
com.google.android.gms:play-services-auth:8.3.0

google actions, base client library
com.google.android.gms:play-services-base:8.3.0

google app indexing
com.google.android.gms:play-services-appindexing:8.3.0

google app invites
com.google.android.gms:play-services-appinvite:8.3.0

google analytics
com.google.android.gms:play-services-analytics:8.3.0

google cloud messaging
com.google.android.gms:play-services-gcm:8.3.0

and there's many more - can find them in link below (no point in listing them all).

source: https://developers.google.com/android/guides/setup


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -