作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用谷歌翻译 api,当我获得发布版本时会抛出以下警告。我搜索了很多示例,但仍然收到此警告。请任何人给我一个解决错误的解决方案。
这里我提到了我的 gradle 文件和警告输出。
我的gradle文件:
buildTypes {
release {
minifyEnabled true
shrinkResources false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/io.netty.versions.properties'
exclude 'META-INF/INDEX.LIST'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.cloud:google-cloud-translate:1.65.0'
// add these dependencies for the speech client
implementation 'io.grpc:grpc-okhttp:1.12.0'
implementation 'com.google.cloud:google-cloud-speech:0.53.0-alpha'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
repositories {
mavenCentral()
}
警告:
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAdapter: can't find superclass or interface org.conscrypt.AllocatedBuffer
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAllocatorAdapter: can't find superclass or interface org.conscrypt.BufferAllocator
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$ServerEngine$1: can't find superclass or interface org.conscrypt.HandshakeListener
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine$1: can't find superclass or interface org.eclipse.jetty.alpn.ALPN$ClientProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine$1: can't find superclass or interface org.eclipse.jetty.alpn.ALPN$ServerProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$1: can't find superclass or interface org.eclipse.jetty.npn.NextProtoNego$ServerProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$2: can't find superclass or interface org.eclipse.jetty.npn.NextProtoNego$ClientProvider
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory: can't find referenced class com.google.appengine.api.memcache.Expiration
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory$AppEngineDataStore: can't find referenced class com.google.appengine.api.memcache.MemcacheServiceFactory
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory$AppEngineDataStore: can't find referenced class com.google.appengine.api.datastore.DatastoreServiceFactory
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory$AppEngineDataStore: can't find referenced class com.google.appengine.api.datastore.Entity
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory$AppEngineDataStore: can't find referenced class com.google.appengine.api.datastore.Blob
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory$Builder: can't find referenced class com.google.appengine.api.memcache.Expiration
com.google.api.client.extensions.appengine.http.UrlFetchRequest: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
com.google.api.client.extensions.appengine.http.UrlFetchRequest: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
com.google.api.client.extensions.appengine.http.UrlFetchResponse: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
com.google.api.client.extensions.appengine.http.UrlFetchResponse: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
com.google.api.client.extensions.appengine.http.UrlFetchResponse: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
com.google.api.client.extensions.appengine.http.UrlFetchTransport: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
com.google.api.client.extensions.appengine.http.UrlFetchTransport: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions$Builder
com.google.api.client.extensions.appengine.http.UrlFetchTransport: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions
com.google.api.client.googleapis.apache.GoogleApacheHttpTransport: can't find referenced class com.google.api.client.http.apache.ApacheHttpTransport
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibDecoder: can't find referenced class com.jcraft.jzlib.JZlib$WrapperType
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibDecoder: can't find referenced class com.jcraft.jzlib.JZlib
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibDecoder: can't find referenced class com.jcraft.jzlib.Inflater
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibEncoder: can't find referenced class com.jcraft.jzlib.JZlib$WrapperType
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibEncoder: can't find referenced class com.jcraft.jzlib.JZlib
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibEncoder: can't find referenced class com.jcraft.jzlib.Deflater
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibEncoder: can't find referenced class com.jcraft.jzlib.JZlib
io.grpc.netty.shaded.io.netty.handler.codec.compression.JZlibEncoder: can't find referenced class com.jcraft.jzlib.Deflater
io.grpc.netty.shaded.io.netty.handler.codec.compression.Lz4FrameDecoder: can't find referenced class net.jpountz.lz4.LZ4Factory
io.grpc.netty.shaded.io.netty.handler.codec.compression.Lz4FrameDecoder: can't find referenced class net.jpountz.xxhash.XXHashFactory
io.grpc.netty.shaded.io.netty.handler.codec.compression.Lz4FrameEncoder: can't find referenced class net.jpountz.lz4.LZ4Factory
io.grpc.netty.shaded.io.netty.handler.codec.compression.Lz4FrameEncoder: can't find referenced class net.jpountz.xxhash.XXHashFactory
io.grpc.netty.shaded.io.netty.handler.codec.compression.Lz4FrameEncoder: can't find referenced class net.jpountz.xxhash.StreamingXXHash32
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfDecoder: can't find referenced class com.ning.compress.lzf.util.ChunkDecoderFactory
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfDecoder: can't find referenced class com.ning.compress.lzf.ChunkDecoder
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfDecoder: can't find referenced class com.ning.compress.BufferRecycler
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.lzf.util.ChunkEncoderFactory
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.lzf.ChunkEncoder
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.BufferRecycler
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.lzf.LZFEncoder
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.BufferRecycler
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.lzf.ChunkEncoder
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzfEncoder: can't find referenced class com.ning.compress.BufferRecycler
io.grpc.netty.shaded.io.netty.handler.codec.compression.LzmaFrameEncoder: can't find referenced class lzma.sdk.lzma.Encoder
io.grpc.netty.shaded.io.netty.handler.codec.compression.ZlibUtil: can't find referenced class com.jcraft.jzlib.JZlib$WrapperType
io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufEncoderNano: can't find referenced class com.google.protobuf.nano.MessageNano
io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufEncoderNano: can't find referenced class com.google.protobuf.nano.CodedOutputByteBufferNano
io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufEncoderNano: can't find referenced class com.google.protobuf.nano.MessageNano
io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufEncoderNano: can't find referenced class com.google.protobuf.nano.CodedOutputByteBufferNano
io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufEncoderNano: can't find referenced class com.google.protobuf.nano.MessageNano
io.grpc.netty.shaded.io.netty.handler.codec.spdy.SpdyHeaderBlockJZlibEncoder: can't find referenced class com.jcraft.jzlib.JZlib$WrapperType
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine: can't find referenced class org.conscrypt.Conscrypt
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAdapter: can't find referenced class org.conscrypt.AllocatedBuffer
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAllocatorAdapter: can't find referenced class org.conscrypt.BufferAllocator
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAllocatorAdapter: can't find referenced class org.conscrypt.AllocatedBuffer
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$ClientEngine: can't find referenced class org.conscrypt.Conscrypt
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$ClientEngine$1: can't find referenced class org.conscrypt.HandshakeListener
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$ServerEngine: can't find referenced class org.conscrypt.Conscrypt
io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$ServerEngine$1: can't find referenced class org.conscrypt.HandshakeListener
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine: can't find referenced class org.eclipse.jetty.alpn.ALPN$Provider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine: can't find referenced class org.eclipse.jetty.alpn.ALPN
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine$1: can't find referenced class org.eclipse.jetty.alpn.ALPN$ClientProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine$1: can't find referenced class org.eclipse.jetty.alpn.ALPN
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine: can't find referenced class org.eclipse.jetty.alpn.ALPN$Provider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine: can't find referenced class org.eclipse.jetty.alpn.ALPN
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine$1: can't find referenced class org.eclipse.jetty.alpn.ALPN$ServerProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine$1: can't find referenced class org.eclipse.jetty.alpn.ALPN
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine: can't find referenced class org.eclipse.jetty.npn.NextProtoNego$Provider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine: can't find referenced class org.eclipse.jetty.npn.NextProtoNego
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$1: can't find referenced class org.eclipse.jetty.npn.NextProtoNego$ServerProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$1: can't find referenced class org.eclipse.jetty.npn.NextProtoNego
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$2: can't find referenced class org.eclipse.jetty.npn.NextProtoNego$ClientProvider
io.grpc.netty.shaded.io.netty.handler.ssl.JettyNpnSslEngine$2: can't find referenced class org.eclipse.jetty.npn.NextProtoNego
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.asn1.x500.X500Name
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.operator.jcajce.JcaContentSignerBuilder
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.cert.X509v3CertificateBuilder
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.cert.jcajce.JcaX509CertificateConverter
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.operator.ContentSigner
io.grpc.netty.shaded.io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator: can't find referenced class org.bouncycastle.cert.X509CertificateHolder
io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator: can't find referenced class sun.security.x509.X509CertInfo
io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator: can't find referenced class sun.security.x509.X500Name
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'java.lang.String getName()' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'void log(org.apache.logging.log4j.Level,java.lang.String,java.lang.Throwable)' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'boolean isEnabled(org.apache.logging.log4j.Level)' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'void log(org.apache.logging.log4j.Level,java.lang.String)' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'void log(org.apache.logging.log4j.Level,java.lang.String,java.lang.Object)' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'void log(org.apache.logging.log4j.Level,java.lang.String,java.lang.Object,java.lang.Object)' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger: can't find referenced method 'void log(org.apache.logging.log4j.Level,java.lang.String,java.lang.Object[])' in program class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger
io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLogger: can't find referenced class org.slf4j.Logger
io.grpc.okhttp.OkHttpChannelProvider: can't find referenced method 'boolean isAndroid()' in program class io.grpc.okhttp.OkHttpChannelProvider
请任何人给我这个错误的解决方案,
提前致谢...
最佳答案
将这些添加到您的发布 proguard-rules 文件中。
-保持类 io.grpc.netty.shaded.io{ *;
-dontwarn io.grpc.netty.shaded.io.**
-保持类android.net.http{ *;
-不要警告 android.net.http.**
-保持类 com.google.common{ *;
-dontwarn com.google.common.**
-保持类 org.apache{ *;
-dontwarn org.apache.**
-保持类 org.joda{ *;
-dontwarn org.joda.**
关于android - `Warning: io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine$BufferAdapter:`怎么解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55575419/
我正在使用谷歌翻译 api,当我获得发布版本时会抛出以下警告。我搜索了很多示例,但仍然收到此警告。请任何人给我一个解决错误的解决方案。 这里我提到了我的 gradle 文件和警告输出。 我的gradl
我是一名优秀的程序员,十分优秀!