java - Flutter,访问隐藏方法

标签 java android flutter gradle

关闭。这个问题需要details or clarity .它目前不接受答案。












想改进这个问题?通过 editing this post 添加详细信息并澄清问题.


去年关闭。







Improve this question




我不知道我收到此错误的确切原因,但每隔 3 秒,我的调试日志中就会出现访问隐藏方法错误。如何检查执行此访问的功能以及为什么?这是真正的问题吗?我应该避免这种情况吗?

 W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/m.sekspir.mood(25281): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)

最佳答案

引用 GitHub 问题:

The bad news is taking a cursory look seems to show that it's not a Flutter issue but a general Android issue with how Android protobufs are using hidden APIs.

It's been fixed on Android 11 in https://android-review.googlesource.com/c/platform/art/+/1294616/ but unfortunately is unlikely to be backported to older Android versions. A more likely scenario is plugins updating to newer transitive versions of protobufs. There isn't much we can do in Flutter. Using the IDE to hide those messages in the output is a reasonable workaround in the meantime such as #27095 (comment).

Internal issue b/154851649. External protobuf issue protocolbuffers/protobuf#7337.


https://github.com/flutter/flutter/issues/27095
忽略它

关于java - Flutter,访问隐藏方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65827874/

相关文章:

java - 使用 JAXB 将 XSD 转换为其类时出错

java - SNMPv3 Trap 发送问题

java - 使用 BufferedReader 排队的数据在哪里?

android - 如何在 Google Play 中找到我的应用程序?

java - Youtube Data-api代码停止工作-更新视频元数据功能

java - Android locationManager 空指针异常? (如何传递上下文?)

Android 布局 - 文字太宽?

dart - 容器不占用 BoxDecoration 图像的大小

Flutter:创建一个 add_close AnimatedIcons

flutter - 如何增加 flutter 底部导航栏中选定图标的大小