RAMBO17
RAMBO17

Reputation: 21

FLUTTER : Execution failed for task ':app:compileFlutterBuildDebug' Failed to create parent directory

I copied my project from another PC and I try to run my application on the real device then I got this error code :

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Failed to create parent directory 'C:\Users\user' when creating directory 'C:\Users\user\AndroidStudioProjects\app_name\android\app\build\intermediates\flutter\debug\flutter_assets'

* 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

I tried using flutter clean but still the same

Then this result of my flutter doctor :

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19042.1237], locale en-ID)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio
[√] VS Code (version 1.60.2)
[√] Connected device (3 available)

• No issues found!

Upvotes: 2

Views: 9230

Answers (3)

Mohit chouhan
Mohit chouhan

Reputation: 65

Delete android/app/build folder and run again it works

delete this folder and run agin

Upvotes: 0

Awais Rehman
Awais Rehman

Reputation: 674

I fixed my problem by deleting the build folder in the android/app directory.

after this

flutter clean

then

Flutter run

Upvotes: 8

Try deleting the build.gradle in the android directory.

Upvotes: 1

Related Questions