Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error launching application on Android SDK built for x86

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.
like image 790
Geoff Avatar asked Nov 29 '18 06:11

Geoff


People also ask

Where do I find ADB?

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.

Where is the AVD Manager in Android Studio?

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.

What is AVD 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.


3 Answers

  1. Open AVD Manager
  2. Wipe Data (delete datas from emulator)
  3. Open emulator
  4. Try to run app
like image 54
DomDunk Avatar answered Nov 15 '22 05:11

DomDunk


I had a similar error when trying to run my flutter application. What I did was:

  1. Open AVD Manager
  2. Press on the small arrow (next to the pen) corresponding to your preferred device
  3. Select "Cold boot now"
  4. Wait for the emulator to open and boot
  5. Run your application

I hope that helps you!

like image 34
Vlad Hondru Avatar answered Nov 15 '22 06:11

Vlad Hondru


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. enter image description here

like image 39
akdombrowski Avatar answered Nov 15 '22 05:11

akdombrowski