When I try to debug my Flutter app in VSCode it shows an error.
I debug using Huawei Y5 Prime 2018 (DRA-LX2)
Log:
Launching lib\main.dart on DRA LX2 in debug mode...
√ Built build\app\outputs\apk\debug\app-debug.apk.
Failed to extract manifest from APK: ProcessException: The command failed
Command: C:\Users\Mohammed\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump
xmltree D:\dicee-flutter\build\app\outputs\apk\app.apk AndroidManifest.xml.
Exception: Problem building Android application: see above error(s).
Exited (sigterm)
What should I do to fix this?
try this command
flutter clean
Related
Error 1 retrieving device properties for AOSP on IA Emulator:
/system/bin/sh: no closing quote
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
/system/bin/sh: no closing quote
Installing build\app\outputs\flutter-apk\app.apk...
adb shell failed to write the SHA hash: ProcessException: Process exited abnormally:
/system/bin/sh: no closing quote
Command: C:/Users/SeEAll/AppData/Local/Android/Sdk\platform-tools\adb.exe -s emulator-5554 shell echo -n 11e25735db8e75cc385109f5dbaa099607817a8e > /data/local/tmp/sky.com.example.learn_flutter.sha1.
Error launching application on AOSP on IA Emulator.
Everything builds and installs perfectly on the emulator. But it can 't open the application itself and I has to close the old version every time and open a new one .
I have created this project before and I'm trying to run it again but I am getting the following error(s) :
Error Log:
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
lib\main.dart:1
√ Built build\app\outputs\flutter-apk\app-debug.apk.
ziparchive W 10-02 23:01:47 10808 9104 Unable to open 'T:my_ap\build\app\outputs\flutter-apk\app.apk': Illegal byte sequence
zipro W 10-02 23:01:47 10808 9104 Error opening archive T:\my_app\build\app\outputs\flutter-apk\app.apk: I/O error
ERROR: dump failed because resource AndroidManifest.xml not found
Failed to extract manifest from APK: ProcessException: The command failed
Command: C:\Users\cordt\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree T:\batí\Mail\projects\shop_app_3\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml.
Exception: Problem building Android application: see above error(s).
Exited (sigterm)
I have tried flutter clean but it didn't help me.
I came across a similar problem on an app I've been working on, the key takeaway is that this happened immediately after I update to the latest version of My flutter SDK. These are the steps I followed to solve this problem.
flutter create .
flutter clean
flutter pub get
flutter run
I'm new in flutter,
I installed flutter, IDE, Android Studio and SDKs in my laptop win 10 recently,
Now When I want to test first default app in my android device, I always face with this error
"Launching lib\main.dart on SM N900 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Error: ADB exited with exit code -1073741674
Error launching application on SM N900.
"
in addition I should say no problem exist after running flutter doctor
now I run flutter run --verbose
result:
I use my phone as an emulator while developing applications with Flutter.
After updating to the Flutter 2 version, Web Folder added to Flutter file directory, I know that.
but i can't run the project
Here I started the classic flutter counter app and the result:
Launching lib\main.dart on MI 5 in debug mode...
lib\main.dart:1
Exception: Gradle task assembleDebug failed with exit code -1
Exited (sigterm)
I searched for a solution on the internet but could not solve this stupid error
how can i solve this problem?
Connect to Internet
run flutter clean
then flutter pub get
then flutter run .
This might help, try it out.
This error usually comes when some files are pending download or so.
if I use flutter run command from terminal
Launching lib\main.dart on MI 5 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 76,3s
Exception: Gradle task assembleDebug failed with exit code -1
I'm not sure but,
Try changing minSdkVersion from 16 to 21
You can find this property in ./android/app/build.gradle
Then do a flutter clean and run the project
If this does not work there might be issue with the emulator or the flutter version.
I just started using flutter on vscode and the Android emulator is connected to vscode. when I run the first flutter code by pressing f5 is not running, and on the console it says:
Launching lib\main.dart on Samsung in debug mode...
Gradle task assembleDebug failed with exit code -1
Exited (sigterm)
when I run it using intellij sometimes it works and sometimes it fails like the problem above. how do you solve the problem with vscode? intellij is too heavy for my computer.
This is a grade problem, and could be hard for you to debug without getting sufficient info on the problem
cd into your android directory
then
run ./gradlew build
you should be able to get the cause of the failed build