Using the android x86 emulator

sign up sign in

If you have a desire to test your app on the Android emulator, you might want to do it using the x86 Intel Atom powered emulator because of the performance gains.

I won't go into the details of setting up an AVD from the manager, there are plenty of good posts around for that. What I will elaborate on is using the emulator (specifically the x86 one) for testing from flow, for snow/luxe apps.

Please note this is a quick guide, and any deep diving on Android specifics are outside the scope of this post.


Step 1

Setup the emulator and have it running, make sure adb can find it with adb devices, and currently, make sure you only have one device/emulator around.

Step 2

Make sure you have flow and snow updated to this and this commit at least, respectively.

Step 3

Specify the --arch x86 flag when building your game.

flow run android --arch x86

Troubleshooting

Watch out for exceptional Android sillyness:

  • adb devices returns no devices even when emulator is running or device is plugged in?

    • adb kill-server
    • adb start-server
    • try adb devices again
  • INSTALL_FAILED_CONTAINER_ERROR

    • apparently increasing the size of the emulator SD storage should fix this, it didn't for me. The only thing that worked for me is project.app.mobile.android.install_location in the flow file should be set to 'auto'. By default it is set to 'preferExternal'.
    • Here is how it's set in the flow file, and when building it logs the android specifics so I can test that the setting is applied.

That's it

The app ~should~ deploy and launch on the emulator as expected.

Tags
androidemulator