I have started including proguard in my project. But getting few warning. I am able to eliminate the warning by adding -dontwarn com.google.**
. in proguard.cfg file. Every thing is okk, but I want to eliminate the -dontwarn
command entirely from my project. After some investigation I found out these warning is there because I have added a jar in my library project. Now I have few questions here.
1) Do I need to add anything in my project properties for progurad to work on my library project. And also doesn't add any warning (As per my research I dont need to I guess. Refer to this url)
2) Since my guava.jar is added in my library project, Do I need to some command in my application proguard.cfg
file to add library path like -libraryjars. If yes, how do I add the -libraryjars . I am talking about path at this instance. What path should I include or whats the syntax of adding path of the jar which is there in my library project?
Just for refrence I am adding 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 anybody help me in this? Any help will be appreciated.
The warnings are harmless in this case: the missing class is not necessary for the correct processing or execution of your code. You can either add the jar that contains javax.annotation.Nullable as a dependency in your project, or you can suppress the warnings. This works indeed:
-dontwarn com.google.**
Alternatively, this is slightly more succinct:
-dontwarn javax.annotation.Nullable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With