3

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!

3 Answers 3

11

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

after this

flutter clean

then

Flutter run

Sign up to request clarification or add additional context in comments.

2 Comments

I did not had build folder, what I did was just ran flutter clean and then again ran the project in my physical device. It worked.
both works fine when u run flutter clean it also clean the enite flutter project
0

Try deleting the build.gradle in the android directory.

2 Comments

Who upvoted this
Mad lad. You deleted the build.gradle even though the compiler simply fails to create the folders.
0

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

delete this folder and run agin

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.