Reputation: 184
I'm trying to create a android emulator inside a docker container but got some problems.
The SDK updates and AVD creation were successful and i try to create the emulator, the following error appears:
./emulator -avd test-22 -no-skin -no-audio -no-window
sh: 1: file: not found
sh: 1: file: not found
WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
Notes: Running last docker version and using java:8-jdk image.
My dockerfile can be found here => https://gist.github.com/leoGalani/1f74621b8e82bd5bc8db586d1f34b8a2
-- Some people told me to install a x86 intel ABI/ARM for the API22 but i cant manage to find the package name so i can install it by command line.
Upvotes: 5
Views: 2832
Reputation: 54
I have same issue and i fix this with install file comman via apt. But still not working yet, i will update when i found a solution.
apt-get install -y --no-install-recommends file libmagic1 libglu1-mesa mesa-utils libpci3 pciutils libpulse0
Edit: I found a solution after add packages to your docker file
add your docker file these commands too
mv /bin/sh /bin/sh.backup
cp /bin/bash /bin/sh
And create new container with
--device /dev/dri --device /dev/video0 --device /dev/snd --device /dev/kvm
Most probably is work now.
Upvotes: 2
Reputation: 171
I solved the same problem by using emulator64 instead emulator.
In this case:
emulator64 -avd test-22 -no-skin -no-audio -no-window
Upvotes: 2