Add jar file path added to library project in PROGUARD

I started to include proguard in my project. But get a warning. I can clear the warning by adding -dontwarn com.google.** . in the proguard.cfg file. Everything is fine, but I want to completely exclude the -dontwarn command from my project. After some investigation, I found out that this warning is, because I added the can to my library project. Now I have few questions.

1) Do I need to add anything to my project properties for progurad to work on my library project. And also does not add any warning (According to my research, I do not need to guess. This URL )

2) Since my guava.jar project has been added to my library project, I need some command in my proguard.cfg application to add the library path, for example -libraryjars . If so, how to add -libraryjars. I am talking about the path in this case. Which path should I include or what syntax should I add the path to the jar that is in my library project?

For refrence only I am adding an error log.

 [2014-12-11 18:00:26 - MyProject] Proguard returned with error code 1. See console [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ForMapWithDefault: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ForMapWithDefault: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$FunctionComposition: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$FunctionForMapNoDefault: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$PredicateFunction: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects$ToStringHelper: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects$ToStringHelper: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Platform: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Preconditions: can't find referenced class javax.annotation.Nullable [2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Preconditions: can't find referenced class javax.annotation.Nullable more few hundred lines of error. 

Can someone help me with this? Any help would be appreciated.

+7
android proguard
source share
1 answer

Warnings are harmless in this case: the missing class is not needed to properly process or execute your code. You can add a jar containing javax.annotation.Nullable as a dependency in your project, or you can suppress warnings. This really works:

 -dontwarn com.google.** 

Alternatively, this is a little more eloquent:

 -dontwarn javax.annotation.Nullable 
+9
source share

All Articles