0

I am building an app with ai2 but I have spend hours trying to get their emulator to work, so I have exported myapp.apk and I am trying to launch it on android studio emulator.

I have followed several tuto included the answer proposed by Tarek on that thread But I am getting and error on cmd.

Here is what I tried:

  1. run android studio as administrator, run the emulator via the AVD manager, waited until it's started.
  2. move myapp.apk in the sdk/platform-tools folder
  3. created a run.bat file in this folder and wrote CMD in it5. copy your desired apk to the same folder
  4. double click on run.bat and wrote: adb install r- "myapp.apk"

Here I am getting an error on CMD: error device not found -waiting for device-. I don't understand because my emulator is running.

I have also tried to launch the emulator without starting android studio with this command emulator -avd <avd_name> [<options>] but I get this message "the system cannot find the file specified".

Community
  • 1
  • 1
MagTun
  • 5,619
  • 5
  • 63
  • 104

1 Answers1

1

The error message appears because adb cannot connect to the device although it is running. This is not supposed to happen, but it does from time to time.

You can always check if adb can see the emulator by running adb devices, which should result in a list of devices it can see. If this list is empty, the device is not found. You can resolve this by adb kill-server, waiting a couple of seconds and then running adb start-server. Try running adb devices again, and the device should be listed, and the installation should succeed.

Starting an emulator can be done by running emulator @<device-name> [options]. The device name can be found by running android list avd. This will result in a list of devices of which the <device-name> will also be listed.

EVR
  • 346
  • 2
  • 7