So, I’m trying to create a docker container that can essentially emulate android to be able to run instrumentation tests (espresso). It’s running on a ARM/64 arch, so I need to emulate a arm64-v8a
, but each time I do, the loading takes forever (which is fine), but the tests fail or the application will just give a Application not responding: system
error.
As a test case, I have been using this repo, and after a successful boot, I run ./gradlew connectedAndroidTest
which has so far always failed. I’ve been using this gist as a guide especially since I need to run it in an env that doesn’t support kvm (regular EC2 instances). Some changes I had to make from the gist is to copy over the emulator folder downloaded from here and the sdk-tools from here since the sdkmanager
doesn’t give the proper folders and doesn’t even provide the emulator package. I took a look at this stackoverflow to get the sdk tools repo. But in short, I can sorta start up the emulator albeit waiting around 30ish minutes but even then I can never seem to pass any of the espresso tests from a simple Sample app.