I install latest version of flutter on windows 10 and when I want to run app with VScode or Android Studio, I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
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
Exception: Gradle task assembleDebug failed with exit code 1
I already try flutter pub cache repair and flutter clean but that did not work.
run these commands:
flutter clean
flutter pub get
Related
i download flutter yesterday and make a project by flutter create command
i had problem in the build and run at first but i follow the instructions of https://docs.flutter.dev/deployment/android
then i build the app and try it in my phone and it work
but when i try to run the app in my phone by usb or in the emulator the same error happend
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
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 6s
Exception: Gradle task assembleDebug failed with exit code 1
i tried the solve of the website above
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\inubo\Downloads\flutter_windows_3.3.7-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1165
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\inubo\Downloads\flutter_windows_3.3.7-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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
I tried to flutter with vscode to produce an app and it worked until setup, but when I finally try to debug the sample code app in the Android emulator, I get an error. Debugging with Edge and Chrome is successful.
flutter clean
flutter pub get
Remove pubspec.look
I tried, but these did not work.
Trying to run my app in my mobile phone error mentioned below. A simple login app and tried to run in web and successfully completed. I getting error
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 12s
Exception: Gradle task assembleDebug failed with exit code 1
You need to accept the licenes from Android to run the app:
run: flutter doctor --android-licenses
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?
I solved it by running these commands :
flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
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.
Hello When I run Flutter Project on visual Studio code it doesn't run
its show me the error in this pic
this Error Because I used scoped_model packeg
When I remove the package from yaml
scoped_model: ^1.1.0
the project run
when I use it it doesn't run and show this error
FAILURE: Build failed with an exception.
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.
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Execution failed for task ':app:compileFlutterBuildDebug' errors usually occur when the packages used are not "installed" correctly. If running flutter clean and flutter pub get doesn't work, delete pubspec.lock then run flutter pub get to re-download the packages configured in the project.