Android 在发布模式下导出APK时,如何解决以下错误?

Android 在发布模式下导出APK时,如何解决以下错误?,android,android-proguard,Android,Android Proguard,禁用proguard配置中的警告- :app:proguardDebug Warning:com.google.common.base.Absent: can't find referenced class javax.annotation.Nullable Warning:com.google.common.collect.Collections2: can't find referenced class javax.annotation.Nullable Warning:com.

禁用proguard配置中的警告-

    :app:proguardDebug
Warning:com.google.common.base.Absent: can't find referenced class javax.annotation.Nullable

Warning:com.google.common.collect.Collections2: can't find referenced class javax.annotation.Nullable

Warning:com.google.common.collect.Tables$UnmodifiableTable: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeBasedTable$TreeRow: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultimap: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset$Aggregate: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset$Aggregate$1: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset$Aggregate$2: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset$AvlNode: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeMultiset$Reference: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeMap: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeMap$1: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeMap$AsMapOfRanges: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeMap$SubRangeMap: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeMap$SubRangeMap$SubRangeMapAsMap$1: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet$AsRanges: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet$ComplementRangesByLowerBound: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet$RangesByUpperBound: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet$SubRangeSet: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.TreeRangeSet$SubRangeSetRangesByLowerBound: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.collect.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.escape.ArrayBasedUnicodeEscaper: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.escape.Escapers$Builder: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.escape.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.eventbus.AnnotatedSubscriberFinder$MethodIdentifier: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.eventbus.EventSubscriber: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.BloomFilter: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.Funnels$SequentialFunnel: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.Funnels$StringCharsetFunnel: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.HashCode: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.Hashing$ConcatenatedHashFunction: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.Murmur3_128HashFunction: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.Murmur3_32HashFunction: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.SipHashFunction: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.hash.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.html.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.io.AppendableWriter: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.BaseEncoding: can't find referenced class javax.annotation.CheckReturnValue
Warning:com.google.common.io.BaseEncoding$StandardBaseEncoding: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.CharSource: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.Closeables: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.Closer: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.CountingInputStream: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.CountingOutputStream: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.MultiInputStream: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.MultiReader: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.PatternFilenameFilter: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.io.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.math.MathPreconditions: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.math.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.net.HostAndPort: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.net.HostAndPort: can't find referenced class javax.annotation.concurrent.Immutable
Warning:com.google.common.net.HostSpecifier: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.net.InetAddresses$TeredoInfo: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.net.InternetDomainName: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.net.MediaType: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.net.MediaType: can't find referenced class javax.annotation.concurrent.Immutable
Warning:com.google.common.net.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.primitives.Doubles: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.primitives.Floats: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.primitives.Ints: can't find referenced class javax.annotation.CheckForNull
Warning:com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
Warning:com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1: can't find referenced class sun.misc.Unsafe
Warning:com.google.common.primitives.UnsignedInteger: can't find referenced class javax.annotation.CheckReturnValue
Warning:com.google.common.primitives.UnsignedInteger: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.primitives.UnsignedLong: can't find referenced class javax.annotation.CheckReturnValue
Warning:com.google.common.primitives.UnsignedLong: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.primitives.package-info: can't find referenced class javax.annotation.ParametersAreNonnullByDefault
Warning:com.google.common.reflect.AbstractInvocationHandler: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.ClassPath$Scanner: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.Element: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.Invokable: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.Invokable$ConstructorInvokable: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.Invokable$MethodInvokable: can't find referenced class javax.annotation.Nullable
Warning:com.google.common.reflect.MutableTypeToInstanceMap: can't find referenced class javax.annotation.Nullable

Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class 
Warning:there were 1326 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.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
:app:proguardDebug FAILED
Error:Execution failed for task ':app:proguardDebug'.
> java.io.IOException: Please correct the above warnings first.
Information:BUILD FAILED
Information:Total time: 8.387 secs
Information:1 error
Information:536 warnings
Information:See complete output in console

其他警告也是如此。

如果您对自己的依赖关系非常自信 您还可以使用:

-dontwarn javax.annotation.**

只需忽略所有潜在警告即可解决问题。

您似乎正在使用proguard,而没有正确编辑proguard的属性。我们为什么要禁用这些警告?我们不能用上课之类的吗?我也深陷其中
-ignorewarnings