Proguard error while evaluating instruction

♀尐吖头ヾ 提交于 2019-12-05 09:15:07

I ended up with the following proguard options:

# WORKAROUND for building project with GMS (google play services) 
-keep class com.google.android.gms.iid.zzd { *; }
-keep class android.support.v4.content.ContextCompat { *; }

This is caused by buildtools working with 8.4 version of google play services. I tried excluding the particular class from optimization with -keep, but it didn't work. I ended up with migrating to google play services 9.0.2:

classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.google.gms:google-services:3.0.0'

...

buildToolsVersion "24.0.0"

...

// google play services
compile ('com.google.android.gms:play-services-gcm:9.0.2')
compile ('com.google.android.gms:play-services-analytics:9.0.2')

...

Try using version 9.2.1; it seems they have fixed a proguard issue. Based on the release notes.

Refer link: https://developers.google.com/android/guides/releases

If you don't feel like bumping the play services just yet, you can also turn off the following optimizations in ProGuard, e.g.

-optimizations !method/marking/private,!method/marking/static,!method/removal/parameter,!method/propagation/parameter

Obviously, this might mean a performance hit, so use judiciously.

Try using version 9.2.1; it seems they have fixed a proguard issue. Based on the release notes.

Refer link: https://developers.google.com/android/guides/releases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!