DiemasMichiels / emulator

Run Android emulator and iOS simulator easily from VScode!
MIT License
100 stars 34 forks source link

Not possible to use -platform qemu2 in emulator start #38

Closed jnitecki closed 3 years ago

jnitecki commented 3 years ago

The recommended platform for emulator is now qemu2 rather than classic (which is a default if no -platform is specified). At least on my environment only qemu2 is configured, so attempt to launch the Android emulator results with: PANIC: Missing emulator engine program for 'x86' CPU. And verbose log shows: emulator:Looking for emulator-x86 to emulate 'x86' CPU emulator:Probing program: xxxxxx/emulator-x86.exe PANIC: Missing emulator engine program for 'x86' CPU.

The quick solution was to add -platform qemu2 in constants.js, but it would be great if ability to pass additional invocation parameters to emulator will be added, there are more options there and maybe someone else will stumble on need of another one.

exports.ANDROID_COMMANDS = {
  LIST_AVDS: ' -list-avds',
  RUN_AVD: ' -engine qemu2 -avd ',
  RUN_AVD_COLD: ' -engine qemu2 -no-snapshot-load -avd '
}
DiemasMichiels commented 3 years ago

Hi thanks for your issue,

We have been very lucky since Sableange made a fix for this in pull request #41 I have added it to the codebase and released a new version: 1.5.0.

Check it out and if you have any feedback feel free to open more issues.