gpt4 book ai didi

flutter - 在具有附加权限的情况下在与剪贴板数据相关的调试控制台中获取警告错误

转载 作者:行者123 更新时间:2023-12-04 13:10:43 26 4
gpt4 key购买 nike

我一直在做一个涉及 ESP32 蓝牙和 Flutter 应用的项目。大约一周前,我的应用程序在没有这些警告消息的情况下运行良好,我在外面呆了一段时间,无法处理它,当我回来时,遇到了这条消息。该应用程序似乎运行良好,但每当我点击或单击某些内容时,我都会收到此“警告”消息。

如果我在 IOS 模拟器中运行该应用程序,它可以正常运行而不会出现此错误,但在我的 android 设备上运行时,该错误就会出现。

这是我不断收到的信息:

Launching lib/main.dart on LM G710 in debug mode...
lib/main.dart:1
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:00000/dasdj02D-m=/sas
W/PlatformPlugin(23531): Attempted to get clipboard data that requires additional permission(s).
W/PlatformPlugin(23531): See the exception details for which permission(s) are required, and consider adding them to your Android Manifest as described in:
W/PlatformPlugin(23531): https://developer.android.com/guide/topics/permissions/overview
W/PlatformPlugin(23531): java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/file/147669 from pid=23531, uid=10406 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
W/PlatformPlugin(23531): at android.os.Parcel.createException(Parcel.java:1950)
W/PlatformPlugin(23531): at android.os.Parcel.readException(Parcel.java:1918)
W/PlatformPlugin(23531): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
W/PlatformPlugin(23531): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
W/PlatformPlugin(23531): at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:698)
W/PlatformPlugin(23531): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1460)
W/PlatformPlugin(23531): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1404)
W/PlatformPlugin(23531): at io.flutter.plugin.platform.PlatformPlugin.getClipboardData(PlatformPlugin.java:295)
W/PlatformPlugin(23531): at io.flutter.plugin.platform.PlatformPlugin.access$700(PlatformPlugin.java:26)
W/PlatformPlugin(23531): at io.flutter.plugin.platform.PlatformPlugin$1.getClipboardData(PlatformPlugin.java:85)
W/PlatformPlugin(23531): at io.flutter.embedding.engine.systemchannels.PlatformChannel$1.onMethodCall(PlatformChannel.java:141)
W/PlatformPlugin(23531): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
W/PlatformPlugin(23531): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
W/PlatformPlugin(23531): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
W/PlatformPlugin(23531): at android.os.MessageQueue.nativePollOnce(Native Method)
W/PlatformPlugin(23531): at android.os.MessageQueue.next(MessageQueue.java:326)
W/PlatformPlugin(23531): at android.os.Looper.loop(Looper.java:160)
W/PlatformPlugin(23531): at android.app.ActivityThread.main(ActivityThread.java:6854)
W/PlatformPlugin(23531): at java.lang.reflect.Method.invoke(Native Method)
W/PlatformPlugin(23531): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
W/PlatformPlugin(23531): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)

我尝试将其添加到我的 Android list 中,但没有成功:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.project">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<application
android:requestLegacyExternalStorage="true">

最佳答案

这可能与剪贴板缓冲区中有图像有关。

https://github.com/flutter/flutter/issues/65388#issuecomment-738539370

我遇到了同样的问题,当我将一些文本复制到手机上的剪贴板时,调试消息就消失了。

关于flutter - 在具有附加权限的情况下在与剪贴板数据相关的调试控制台中获取警告错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65571836/

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