1

I want to run flutter app with (VSCode or Android studio) ,for both I get this error :

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.io.IOException: The device is not ready

* 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 5s
Exception: Gradle task assembleDebug failed with exit code 1

Is there any solution?

2 Answers 2

3

I solved it by running these commands :

flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
1

Got mine running with this:

flutter clean
flutter pub get

type flutter clean in the terminal and then wait. After the successful execution of the previous command, type flutter pub get to fetch all dependencies needed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.