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

Flutter 在调试控制台中获取与具有附加权限的剪贴板数据相关的警告错误,flutter,flutter-dependencies,Flutter,Flutter Dependencies,我一直在从事一个涉及ESP32蓝牙和颤振应用程序的项目。大约一周前,我的应用程序在没有这些警告消息的情况下运行良好,我在外面呆了一段时间,无法处理它,当我回来时,看到了这条消息。该应用程序似乎工作正常,但每当我点击或点击某个东西时,就会收到这个“警告”消息如果我在IOS simulator中运行该应用程序,它将在没有此错误的情况下正常工作,但在我的android设备上运行时,会显示错误这是我一直得到的信息: Launching lib/main.dart on LM G710 in debug

我一直在从事一个涉及ESP32蓝牙和颤振应用程序的项目。大约一周前,我的应用程序在没有这些警告消息的情况下运行良好,我在外面呆了一段时间,无法处理它,当我回来时,看到了这条消息。该应用程序似乎工作正常,但每当我点击或点击某个东西时,就会收到这个“警告”消息

如果我在IOS simulator中运行该应用程序,它将在没有此错误的情况下正常工作,但在我的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清单中,但没有成功:

<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">

这是一个似乎只发生在LG设备上的问题。但可能需要一段时间才能降落在“颤振稳定”上


您可能希望尝试
flatterclean
,它可以帮助开发人员解决相应的GitHub问题。如果没有帮助,.

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

我也有同样的问题,当我把一些文字复制到手机的剪贴板上时,调试信息就消失了