Switching to guava 20.0 make Proguard fails when shrink and minify
See original GitHub issueHello,
Switching to Guava 20.0 as suggested in Android Studio make release build failed when it’s done with Proguard shrinkRessources or/and minifyEnabled enabled.
Rollback to Guava 18.0 “solves” it.
Warning: com.google.common.util.concurrent.FuturesGetChecked$GetCheckedTypeValidatorHolder$ClassValueValidator$1: can't find superclass or interface java.lang.ClassValue Warning: com.google.common.base.AbstractIterator: can't find referenced class com.google.errorprone.annotations.CanIgnoreReturnValue
(…)
Warning: there were 696 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options.
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first. :app:transformClassesAndResourcesWithProguardForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
Android Studio 2.3.3 Gradle 3.3 Proguard 4.7 JRE1.8.0_122
Thanks,
Eric
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
I’m a bit confused (maybe because my understanding is not complete): why are all the "keep"s unnecessary?
My feeling is that only those can be safely removed (i.e. have fallback) should not be “keep”(-ed), but the only one with fallback is
sun.misc.Unsafe
. Why don’t we need to keep others, e.g.java.lang.ClassValue
or evencom.google.common.base.**
? Doesn’t-dontwarn
just supress the warning but still removes these classes (so that these classes will not be in the compiled file (.apk), and will cause errors like “ClassNotFound”)?Those rules are vastly overly keep-y. Why are you suppressing warnings and then also keeping for each?
On Mon, Aug 28, 2017 at 3:32 PM eldk notifications@github.com wrote: