Invalid executable directory: ../ emulator

I am trying to get Android emulator to work with Ionic 2. Here is my setup ...

ANDROID_HOME=/Users/anthonygordon/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home

      

In Android Studio, I have installed AVD Nexus_5_API_24

And I am getting the following error on startup ionic run android

No emulator specified, defaulting to Nexus_5_API_24


Waiting for emulator to start...


[140736250184640]:ERROR:android/android-emu/android/opengl/EmuglBackendScanner.cpp:37:Invalid executable directory: ../emulator
[140736250184640]:ERROR:android/android-emu/android/opengl/EmuglBackendScanner.cpp:37:Invalid executable directory: ../emulator

[140736250184640]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '../emulator/qemu/darwin-x86_64/qemu-system-i386': No such file or directory

      

Any thoughts ??? I am stuck

+3


source to share


2 answers


Ok, got a partial answer. I got this problem when I was trying to start the emulator using the normal android sdk command.

emulator -avd <name of avd>

When I ran which emulator

it pointed to /usr/local/bin/emulator

, but not the emulator in the sroid sroid root directory in/Users/<user name>/Library/Android/sdk/tools/emulator

So, I just ran this file with the following.



/Users/<user name>/Library/Android/sdk/tools/emulator -avd <emulator name>

and it starts without crashing.

I've never used ionic, but I'm guessing it points to the wrong binary for the emulator. Maybe try removing the emulator binary from / usr / local / bin?

+7


source


The problem is that the "emulator" is trying to work with a relative path:

Could not launch '../emulator/qemu/darwin-x86_64/qemu-system-i386'

I'm not 100% sure how to fix this at a basic level. My solution was similar to MikeSchem, starting the emulator manually from the absolute path of the emulator directory:



/Users/<USER>/Library/Android/sdk/tools/emulator -avd Nexus_5X_API_24

In my .profile:

function androidstart() {
    /Users/<USER>/Library/Android/sdk/tools/emulator -avd Nexus_5X_API_24;  
}
alias androidstart='androidstart'

      

0


source







All Articles