1
votes

flutter: impossible d'exécuter un programme hello world de base car «l'exécution a échoué pour la tâche»: app: packageDebug ». '

Je suis un débutant total dans le flutter et le studio Android et alors que j'essayais de lancer un programme hello world très basique, j'ai eu ceci:

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

J'ai essayé flutter clean mais cela n'a pas fonctionné. J'ai effacé manuellement le cache via le studio Android qui ne fonctionnait pas non plus. J'ai finalement redémarré ma machine et cela n'a pas fonctionné non plus.

Je n'ai pas de chance ni de solutions. Toute aide serait appréciée.

(sous Windows 10)


3 Réponses :


0
votes

Je recommanderais de retélécharger le SDK Flutter et d'utiliser Microsoft VSC au lieu d'Android Studio. Sa légèreté et sa dose posent beaucoup de stress sur votre PC.


3 commentaires

Malheureusement, je ne peux pas faire cela parce que j'ai acheté un cours udemy sur le flutter et que le professeur utilise Android Studio, j'aimerais donc rester en phase avec elle.


Bien ... Mais quelle version du SDK Flutter utilisez-vous ?? Avez-vous téléchargé une version stable?


Oui, c'est une version stable. Flutter 1.17.5.



5
votes

Allez sur la route D: \ flutter \ newapp \ build \ app \ intermediates \ signature_config \ debug \ out \ et supprimez le fichier signature-config.json puis recommencez.


0 commentaires

0
votes

J'ai eu la même erreur, la commande flutter clean a fonctionné.


0 commentaires