关闭。这个问题需要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/