小编emi*_*lda的帖子

使用Android和Google API客户端的Proguard

首先,对不起,如果这个话题得到了回答,但我还没找到......

我是Android和Proguard的新手.在开发我的应用程序的最后,我想用proguard减小它的大小,当然.由于我在我的应用程序中使用谷歌api客户端的一些库,我已将它们添加为外部jar.

好吧,我的应用程序工作正常,没有通过proguard步骤,但当我尝试导出它,它开始我的头痛.很多警告,我不知道如何跳过或安排.像这样的东西:

[2012-03-05 07:20:06 - CollaJoveThreads] Proguard returned with error code 1. See console
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2012-03-05 07:20:06 - CollaJoveThreads] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
Run Code Online (Sandbox Code Playgroud)

而且更相似.

我跟踪了Google开发人员的推荐,并将这些行添加到我的proguard.cfg中:

# Needed by google-api-client to keep generic types …
Run Code Online (Sandbox Code Playgroud)

android proguard google-api-java-client

11
推荐指数
1
解决办法
5940
查看次数

标签 统计

android ×1

google-api-java-client ×1

proguard ×1