Openfl test android and the -emulator option

What is the purpose of the -emulator option?

When I run

openfl test android -emulator

I get:

Error: Cannot copy to "Export/android/bin/libs/x86/libstd.so", is the file in use?

Why do I get this error?
That Error is printed even if the only running emulator is an arm.

When I run an emulator with:

emulator avd Nexus_Arm_21

and then run

openfl test android

The program runs on the emulator (almost) as expected.
(a png I add doesn’t appear in android, when it is in neko, flash and mac)

Is -emulator just to force the install to ignore physical devices and prefer active emulators?

What version of HXCPP do you have? Older versions might not build to X86 properly, and might not include the standard Android X86 binaries

hxcpp 3.1.68
openfl 2.2.7
systools 1.1.0

Can you try closing the emulator and doing a -clean build or something?

-clean didn’t work, but I deleted the x86 folder (in the project) and now it’s working with the -emulator option. Thanks!

It even opens the emulator for me, The (alphabetically) first AVD, a 64 bit Arm w/API 21.

The Bitmap image (.png) is still not added.

Hmm, perhaps we need to improve it a bit in order to make it easier to specify which emulator to use, I’m not sure it will behave properly with the “-emulator” option (unless you manually specify architectures) unless the emulator it runs is an X86 emulator. I suppose I’ve only worked with having just one emulator in the AVD list, I forget what it uses to pick, and if it is capable of knowing the arch of each one :slight_smile:

(: Yeah! In the meantime, if you have to choose, you can boot the emulator of choice with command line and run openfl test android without the -emulator option.

-emulator forces you to close your device each time anyway, as far as I can tell. And Android emulators take ages to boot.