如何解决抖动错误(操作系统错误:访问被拒绝,errno = 5)? [英] How to solve flutter error (OS Error: Access Denied, errno = 5 )?

查看:48
本文介绍了如何解决抖动错误(操作系统错误:访问被拒绝,errno = 5)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习Flutter.我的问题是,当我第一次运行flutter项目时,它会在设备上成功运行并成功安装,但是如果我断开设备并重新运行项目,则会出现错误.

I am trying to learn Flutter. My problem is that when I run my flutter project for the first time it runs and installs successfully on the device, but if I disconnect the device and rerun the project it gives an error.

我正在尝试在我的应用中显示图像.

I am trying to display images in my app.

当我运行 flutter clean flutter clean build flutter clean cache 并重新运行项目时,它没有给出错误,然后断开设备连接,问题再次出现.我在Google上搜索了几个小时,但没有帮助我.这是错误:

When I run flutter clean or flutter clean build or flutter clean cache and rerun the project it does not gives the error, then after disconnecting the device the problem occurs again. I searched google for hours but it did not help me. this the the error:

Target debug_android_application failed: FileSystemException: Cannot copy file to 'G:\Flutter 
   Projects\my_practice_7\build\app\intermediates\flutter\debug\flutter_assets\images\image.png', 
path = 'G:\Flutter Projects\my_practice_7\images\image.png' 
(OS Error: Access is denied. 
, errno = 5)
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'G:\Android\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.

扑打医生-v

[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.476], locale en-GB)
  • Flutter version 1.12.13+hotfix.5 at G:\Android\flutter
  • Framework revision 27321ebbad (7 weeks ago), 2019-12-10 18:15:01 -0800
  • Engine revision 2994f7e1e6
  • Dart version 2.7.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
  • Android SDK at G:\Android\Sdk
  • Android NDK location not configured (optional; useful for native profiling support)
  • Platform android-29, build-tools 29.0.2
  • ANDROID_HOME = G:\Android\Sdk\
  • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
  • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
  • All Android licenses accepted.

[√] Android Studio (version 3.5)
  • Android Studio at C:\Program Files\Android\Android Studio
  • Flutter plugin version 42.1.1
  • Dart plugin version 191.8593
  • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.41.1)
  • VS Code at C:\Users\HP\AppData\Local\Programs\Microsoft VS Code
  • Flutter extension version 3.7.1

[√] Connected device (1 available)
  • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

  • No issues found!

推荐答案

我从文件的当前位置删除了该文件,并进行了运行,以使flutter再次重新构建该文件,并且该文件可以正常工作.

I deleted the file from its current location and made a run to make flutter re-build the file again and it worked.

这篇关于如何解决抖动错误(操作系统错误:访问被拒绝,errno = 5)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆