【无标题】

升级gradle 8.0 后打包报如下错误 

> Task :app:minifyReleaseWithR8
AGPBI: {"kind":"warning","text":"Unexpected reference to missing service class: META-INF/services/reactor.blockhound.integration.BlockHoundIntegration.","sources":[{"file":"/app/build/intermediates/merged_java_res/release/base.jar"}],"tool":"R8"}

AGPBI: {"kind":"warning","text":"Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /app/build/outputs/mapping/release/missing_rules.txt.\n","sources":[{}]}

AGPBI: {"kind":"warning","text":"Missing class com.aayushatharva.brotli4j.Brotli4jLoader (referenced from: void io.netty.handler.codec.compression.Brotli.<clinit>() and 2 other contexts)\n

Missing class com.aayushatharva.brotli4j.decoder.DecoderJNI$Status (referenced from: void io.netty.handler.codec.compression.BrotliDecoder$1.<clinit>() and 1 other context)\n
Missing class com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper (referenced from: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper io.netty.handler.codec.compression.BrotliDecoder.decoder and 4 other contexts)\n
Missing class com.aayushatharva.brotli4j.encoder.Encoder$Mode (referenced from: void io.netty.handler.codec.compression.BrotliOptions.<clinit>())\n
Missing class com.aayushatharva.brotli4j.encoder.Encoder$Parameters (referenced from: com.aayushatharva.brotli4j.encoder.Encoder$Parameters io.netty.handler.codec.compression.BrotliEncoder.parameters and 7 other contexts)\n
Missing class com.aayushatharva.brotli4j.encoder.Encoder (referenced from: io.netty.buffer.ByteBuf io.netty.handler.codec.compression.BrotliEncoder.allocateBuffer(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, boolean))\n
Missing class com.android.org.conscrypt.SSLParametersImpl (referenced from: void org.conscrypt.KitKatPlatformOpenSSLSocketImplAdapter.<init>(org.conscrypt.AbstractConscryptSocket))\n
Missing class com.github.luben.zstd.Zstd (referenced from: io.netty.buffer.ByteBuf io.netty.handler.codec.compression.ZstdEncoder.allocateBuffer(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, boolean) and 1 other context)\n
Missing class com.google.protobuf.ExtensionRegistry (referenced from: void io.netty.handler.codec.protobuf.ProtobufDecoder.<init>(com.google.protobuf.MessageLite, com.google.protobuf.ExtensionRegistry))\n
Missing class com.google.protobuf.ExtensionRegistryLite (referenced from: com.google.protobuf.ExtensionRegistryLite io.netty.handler.codec.protobuf.ProtobufDecoder.extensionRegistry and 2 other contexts)\n

解决:将如下路径里的信息拷贝到proguard-rules.pro 就可以解决

app -> build -> outputs -> mapping -> your_app_name -> missing_rules.txt

我的是这样的

# Please add these rules to your existing keep rules in order to 
  suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn android.os.ServiceManager*
-dontwarn com.bun.miitmdid.core.MdidSdkHelper*
-dontwarn com.bun.miitmdid.interfaces.IIdentifierListener*
-dontwarn com.bun.miitmdid.interfaces.IdSupplier*
-dontwarn com.google.firebase.iid.FirebaseInstanceId*
-dontwarn com.google.firebase.iid.InstanceIdResult*
-dontwarn com.huawei.hms.ads.identifier.AdvertisingIdClient$Info*
-dontwarn com.huawei.hms.ads.identifier.AdvertisingIdClient*
-dontwarn com.tencent.android.tpush.otherpush.OtherPushClient*

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值