简体   繁体   English

使用带有 flutter 的 Firestore 时出现问题

[英]problem when using firestore with flutter

I have a problem when i try to access the data stored in cloud firestore, knowing that the firebase authentication is working perfectly.当我尝试访问存储在云 Firestore 中的数据时遇到问题,我知道 firebase 身份验证工作正常。 the debug console gives me this message调试控制台给了我这个消息

W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/le.esi_gabsenc(18680): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)

I'm using Samsung galaxy A50 android 10.我正在使用三星 Galaxy A50 android 10。

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.坏消息是粗略一看似乎表明这不是 Flutter 问题,而是一般的 Android 问题,即 Android protobufs 如何使用隐藏的 API。

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.它已在https: //android-review.googlesource.com/c/platform/art/+/1294616/ 中的 Android 11 上修复,但不幸的是不太可能向后移植到旧版 ZE84E30B93978CDB6DZDB2B93978CDB6DZDB。 A more likely scenario is plugins updating to newer transitive versions of protobufs.更可能的情况是插件更新到更新的 protobufs 传递版本。 There isn't much we can do in Flutter.在 Flutter 中我们无能为力。 Using the IDE to hide those messages in the output is a reasonable workaround in the meantime such as #27095 (comment).与此同时,使用 IDE 隐藏 output 中的这些消息是一种合理的解决方法,例如 #27095(评论)。

Internal issue b/154851649.内部问题 b/154851649。 External protobuf issue protocolbuffers/protobuf#7337.外部 protobuf 问题 protocolbuffers/protobuf#7337。

https://github.com/flutter/flutter/issues/27095 https://github.com/flutter/flutter/issues/27095

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM