簡體   English   中英

flutter:無法運行基本的 hello world 程序,因為“任務 ':app:packageDebug' 的執行失敗”。 '

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

我是 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

我已經嘗試flutter clean但這沒有用。 我通過 android 工作室手動清除了緩存,但也沒有用。 我終於重新啟動了我的機器,但也沒有用。

我沒有運氣和解決方案。 任何幫助,將不勝感激。

(運行 windows 10)

Go 到路由D:\flutter\newapp\build\app\intermediates\signing_config\debug\out\並刪除文件signing-config.json然后再次運行。

我建議重新下載 flutter SDK,並使用 Microsoft VSC 代替 Android Studio。它的輕量級和劑量會給您的 PC 帶來很大壓力。

我有同樣的錯誤,命令 flutter clean 工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM