There are a least a dozen previously compiled and running flutter applets that suddenly will not compile under Android Studio or Intellij.
Even if i build a new default Flutter app i get this crash error:
Clearly something has changed .. plugins/dependencies have been upgraded/updated and the .gradle and .idea directories removed ... and projects rebuilt .. but nothing gets past this:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
cmd: Can't find service: activity
Installing build/app/outputs/apk/app.apk...
Error: ADB exited with exit code 1
adb: failed to install/home/jedaa/workspace/flutter_apps/studio/flutter_apprescue/build/app/outputs/apk/app.apk: cmd: Can't find service: package
Error launching application on Android SDK built for x86.
Firstly check if the adb is present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools and check if adb.exe is present.
The Device Manager is an interface you can launch from Android Studio that helps you create and manage AVDs. To open the new Device Manager, do one of the following: From the Android Studio Welcome screen, select More Actions > Virtual Device Manager.
The avdmanager is a command-line tool that lets you create and manage Android Virtual Devices (AVDs) from the command line. An AVD lets you define the characteristics of an Android handset, Wear OS watch, or Android TV device that you want to simulate in the Android Emulator.
I had a similar error when trying to run my flutter application. What I did was:
I hope that helps you!
Changing the emulator to cold boot rather than quick boot also seemed to resolve the problem. Rather than a complete wipe.
It's in advanced settings > emulated performance > boot option when editing a device in AVD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With