How to fix Proguard issue with Google Drive REST API

核能气质少年 提交于 2019-12-01 14:01:06

You need

-keep class com.google.** { *;} 

and

-keep class com.fasterxml.** { *;}

Also you might try to keep less from the SDK. These rules are very wide.

In my case I had to put these keeps:

-keep class br.project.pine.** { *;}
-keep class com.google.api.services.drive.** { *;}

Tip: When enabling minify in debug mode, pay attention to the LogCat. It can help you to find out the real missing package/class/attribute.

This one worked for me:

-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}

As seen in the official google sample:

https://github.com/google/google-api-java-client-samples/blob/master/tasks-android-sample/proguard-google-api-client.txt

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