gpt4 book ai didi

使用 flutter 构建时, flutter 终端/控制台充满 "greyList API"异常

转载 作者:行者123 更新时间:2023-12-03 03:51:50 25 4
gpt4 key购买 nike

我正在 flutter 中开发,我的 logcat 总是充满了这些日志

W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
I/ample.wmbsende( 6845): Background concurrent copying GC freed 126466(5699KB) AllocSpace objects, 6(184KB) LOS objects, 49% free, 7638KB/14MB, paused 476us total 240.336ms
W/ample.wmbsende( 6845): Reducing the number of considered missed Gc histogram windows from 135 to 100
W/System ( 6845): A resource failed to call release.
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
I/flutter ( 6845): Instance of 'QuerySnapshot'
D/HostConnection( 6845): HostConnection::get() New Host Connection established 0xf163ba70, tid 7580
D/EGL_emulation( 6845): eglMakeCurrent: 0xf1420a00: ver 2 0 (tinfo 0xf176df30)
D/HostConnection( 6845): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 6845): eglCreateContext: 0xc1a46600: maj 1 min 0 rcv 1
D/EGL_emulation( 6845): eglMakeCurrent: 0xc1a46600: ver 1 0 (tinfo 0xbd76b5d0)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
它谈论的是一些“灰名单”API,我阅读了它,我从文档中最多可以得出灰名单 API 是安全问题。
话虽如此,我确实希望摆脱这些异常,但我无法更改任何 API。
我怀疑有问题的库是:
flutter_google_maps:^3.8.0
每次运行此特定代码时,logcat 中都充满了垃圾异常。
  class Map extends StatelessWidget {
final GlobalKey<GoogleMapStateBase> _key;

Map(this._key);

@override
Widget build(BuildContext context) {
return Consumer<ReceiverDataModel>(
builder: (context, state, child) => StreamBuilder<QuerySnapshot>(
stream: Db.getStream(state.code),
builder: (context, snapshot) {
print(snapshot.data);
return GoogleMap(
key: _key,
initialPosition: GeoCoord(30.1290, 77.2674),
initialZoom: 20,
mapType: MapType.roadmap,
//markers: markers,
mobilePreferences: MobileMapPreferences(
myLocationEnabled: true, myLocationButtonEnabled: true),
);
},
),
);
}
}
logcat 使我很难看到我试图打印的一些重要信息。我只想抑制这些异常。
谢谢你的时间。

最佳答案

如果使用 IntelliJ 控制台,您可以通过右键单击 + 像这样折叠线条来“折叠”这些无用的线条。
如果使用终端,您可以将输出通过管道传递给 grep 命令。

关于使用 flutter 构建时, flutter 终端/控制台充满 "greyList API"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62921843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com