简体   繁体   English

flutter:无法运行基本的 hello world 程序,因为“任务 ':app:packageDebug' 的执行失败”。 '

[英]flutter: can't run a basic hello world program because ' Execution failed for task ':app:packageDebug'. '

I'm a total beginner to flutter and android studio and as I was trying to run a very basic hello world program I got this:我是 flutter 和 android 工作室的初学者,当我尝试运行一个非常基本的 hello world 程序时,我得到了这个:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > java.io.FileNotFoundException: D:\flutter\newapp\build\app\intermediates\signing_config\debug\out\signing-config.json (Access is denied)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > java.io.FileNotFoundException: D:\flutter\newapp\build\app\intermediates\signing_config\debug\out\signing-config.json (Access is denied)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

I've tried flutter clean but that didn't work.我已经尝试flutter clean但这没有用。 I manually cleared cache through android studio that didn't work either.我通过 android 工作室手动清除了缓存,但也没有用。 I finally rebooted my machine and that didn't work either.我终于重新启动了我的机器,但也没有用。

I'm out of luck and solutions.我没有运气和解决方案。 Any help would be appreciated.任何帮助,将不胜感激。

(running windows 10) (运行 windows 10)

Go to the route D:\flutter\newapp\build\app\intermediates\signing_config\debug\out\ and delete the file signing-config.json then run again. Go 到路由D:\flutter\newapp\build\app\intermediates\signing_config\debug\out\并删除文件signing-config.json然后再次运行。

I would recommend Redownloading the flutter SDK, and use Microsoft VSC instead of Android Studio.Its lightweight and dosent pose much stress on your PC.我建议重新下载 flutter SDK,并使用 Microsoft VSC 代替 Android Studio。它的轻量级和剂量会给您的 PC 带来很大压力。

I had the same error, the command flutter clean worked.我有同样的错误,命令 flutter clean 工作。

暂无
暂无

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

相关问题 Flutter:任务':app:packageDebug'的执行失败 - Flutter: Execution failed for task ':app:packageDebug' flutter hello_world 项目:任务 ':app:compileDebugKotlin' 执行失败 - flutter hello_world project: execution failed for task ':app:compileDebugKotlin' 任务':app:packageDebug'的执行失败 - Execution failed for task ':app:packageDebug' react native cli run android 上的任务“:app:packageDebug”执行失败 - Execution failed for task ':app:packageDebug' on react native cli run android 示例 Hello world flutter 应用程序构建失败:任务 ':app:mergeDebugResources' 执行失败 - Example Hello world flutter app build failed: Execution failed for task ':app:mergeDebugResources' 错误:任务':app:packageDebug'的执行失败 - Error: Execution failed for task ':app:packageDebug' Android:任务 ':app:packageDebug' 执行失败。 > 数据 - Android: Execution failed for task ':app:packageDebug'. > data android错误:任务执行失败':app:packageDebug' - android Error:Execution failed for task ':app:packageDebug' 编译 Flutter 时出现“任务 ':app:packageDebug' > 生成 v1 签名失败”异常 - "Execution failed for task ':app:packageDebug' > Failed to generate v1 signature" exception while compiling Flutter 任务 ':app:packageDebug' 执行失败 - 无法读取 zip 文件 - Execution failed for task ':app:packageDebug' - Failed to read zip file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM