5

I got similar to this problem: Android Studio 64-bit ERROR: 32-bit Linux Android emulator binaries are DEPRECATED

I run android studio 2.1.1 on Gentoo Linux/amd64, and when I try to run emulator of android android studio give me error:

/home/user/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_23 ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them you will have to do at least one of the following: - Use the '-force-32bit' option when invoking 'emulator'. - Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment. Either one will allow you to use the 32-bit binaries, but please be aware that these will disappear in a future Android SDK release. Consider moving to a 64-bit Linux system before that happens.

But

$ file /home/user/Android/Sdk/tools/emulator /home/user/Android/Sdk/tools/emulator: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.15, stripped

As you can see emulator is 64bit binary, I run it 64bit OS, also Tools->Android->Avd Manger show that Nexus_5X_API_23 has CPU/ABI = x86_64,

so what is "32-bit error" about?

Update

Looks like it need some permission, because of I can run emulator from root user. But still can not guess what exactly it need.

Community
  • 1
  • 1
user1244932
  • 7,352
  • 5
  • 46
  • 103

1 Answers1

6

The problem was with the SHELL environment variable. If I run emulator under root with SHELL=/bin/bash it all works fine, but if I run emulator from an ordinary user with SHELL=bash, it fails and shows the error message about 32 bit.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
user1244932
  • 7,352
  • 5
  • 46
  • 103