Kony can't launch my Android emulator any more

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I'm using Windows 10, Kony Visualizer 8.2. I'm not very familiar with Kony or Android Studio.

I have one configured Android Emulator named "Nexus5X." The location points to a copy of emulator.exe which exists, and the AVD Name matches the one in Android Studio, and I can launch it from there just fine.

I used to be able to launch my Android emulator directly from within Kony by going to Product->Launch Emulator->Nexus 5X->Native. Now if I do that, I get this output:

AVD: Nexus_5X_API_26

APK: C:\Users\{**}\KonyVizEWS\temp\EmployeeDirectory\build\luaandroid\dist\luavmandroid.apk

AppId: EmpDirectory

Emulator arguments: " "

Package: com.orgname.EmployeeDirectory

serialnumber: emulator-5554

profileapp: false

devlang: js

Web Selected: false

adb.exe

com.orgname.EmployeeDirectory

emulator-5554

5554

Launching emulator

* daemon not running; starting now at tcp:5037

* daemon started successfully

error: device 'emulator-5554' not found

error: device 'emulator-5554' not found

Waiting for HOME to launch

Waiting..

- waiting for device -

If I open a command prompt and type "adb devices," it outputs this:

List of devices attached

If I launch Nexus_5X_API_26 through Android Studio and then run the same command, it outputs this:

List of devices attached

emulator-5554 device

Previously I was having this same problem, except that the command was outputting "emulator-5556" and I don't know why, but a Windows reboot set it back to "emulator-5554" but didn't solve the problem.

I tried deleting the AVD and emulator profile and recreating them, but it didn't help.

Hi , To launch the AVD you created, do the following(Verify):

  1. In your computer, add the following entries to the user path variable as part of the environment variables in the order of preference specified below. Prefix the entries to path.
    1. AndroidSDKPath
    2. AndroidSDKPath\emulator\
    3. AndroidSDKPath\tools\
    4. AndroidSDKPath\platform-tools
  2. Set the ANDROID_HOME variable to AndroidSDKPath.
  3. Restart the machine and try the command if the emulator configured is ARM based.
  4. emulator.exe -avd <avdname> -port 5554
  5. Cross check if the right emulator is being picked from right SDK folder by using the below command in command prompt.
  6. Windows:
  7. where emulator
  8. MAC:
  9. which emulator

--> If the AndroidSDKPath/emulator folder and the AndroidSDKPath/tools folder contains the emulator.exe in the newly downloaded SDK, make sure the one under emulator is picked up.

--> If the right path is not being picked up or if the emulator command fails to launch the AVD, clean up unnecessary PATH environment variable entries and check if it resolves the issue.

1 - Ok.

2 - Ok.

3 - Restarted, but the emulator is x86_64 based.

4 - This command only works if I cd to a directory containing "emulator.exe" in it.

It also outputs this to the console:

C:\Users\{**}\AppData\Local\Android\Sdk\tools>emulator -avd Nexus5X26 -port 5554

emulator: Requested console port 5554: Inferring adb port 5555.

HAX is working and emulator runs in fast virt mode.

audio: Failed to create voice `goldfish_audio_in'

C:\Users\{**}\AppData\Local\Android\Sdk\tools\..\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed

audio: Failed to create voice `adc'

Your emulator is out of date, please update by launching Android Studio:

- Start Android Studio

- Select menu "Tools > Android > SDK Manager"

- Click "SDK Tools" tab

- Check "Android Emulator" checkbox

- Click "OK"

UpdateLayeredWindowIndirect failed for ptDst=(1007, 132), size=(300x21), dirty=(300x21 0, 0) (A device attached to the system is not functioning.)

emulator: INFO: boot completed

5: This is the output:

C:\Users\{**}\AppData\Local\Android\Sdk\tools\emulator.exe

C:\Users\{**}\AppData\Local\Android\Sdk\emulator\emulator.exe

Kony Visualizer still doesn't launch the emulator when I ask it to. The output is the same as before.

Got it! For some reason, Sdk\emulator was below Sdk\tools in the user path. Reversing the order and restarting Kony fixed the problem.

If above settings don't work, then on top of that env variables.

  1. You need to set Java_HOME and Java jdk/jre path in path variable
  2. Try setting Android Home in Build Settings of the IDE. See attached file