14

I have set the android development environment in Ubuntu 10.10, 32 bit. After creating the AVD when I launched the emulator I have received the following error.

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.

The ADT version I am using is 23.0.3.1327240. The SDK libraries I am using is 32bit. kindly help me. Thanks.

6
  • 1
    Upgrade to a new version switch to 64 bit.
    – Mateo
    Oct 9, 2014 at 14:17
  • 4
    You should upgrade to a supported Ubuntu release. Normally we would close this as unsupported, but since this issue isn't really specific to being an older release and I think other people might experience this problem on a supported release I will leave it. But I highly suggest you upgrade to at least 12.04.
    – Seth
    Oct 9, 2014 at 14:58
  • 3
    I agree: this is in the minority of new questions about a problem in an EoL release where (a) we know the answer is release-independent, and (b) both the question and the answer (because they involve a common activity with a non-obvious pitfall) seem like they may be of especially high value to others. This could be edited to generalize it to all releases, but we should keep it open. @MohanrajMani But please don't continue to use 10.10. It's been unsupported for a long time, and part of what that means is it's not updated to fix newly discovered security vulnerabilities. It's risky to use. Oct 9, 2014 at 20:48
  • 1
    This has nothing to do with Ubuntu 10.10, but is specifically due to trying to use the android emulator on a 32 bit linux distro when it was designed for 64 bit. same thing will happen on Ubuntu 12.xx and 14.xx if using the intel 386 distro. Also, last I checked you cant just switch to 64 bit. 64 bit is only supported on AMD, 32 bit is only supported on intel.
    – JSON
    Nov 8, 2014 at 10:07
  • 1
    @JSON The 64-bit version of Ubuntu runs on both 64-bit AMD and 64-bit Intel processors. The "amd" in "amd64" doesn't mean it's AMD-only. Similarly, the 32-bit version runs on both (32- and -64-bit) AMD and (32- and -64-bit) Intel processors--the "i" in "i386" does not mean it is Intel-only. See Is the 64-Bit version of Ubuntu only compatible with AMD CPUs? and Difference between the i386 download and the amd64? for details. (I agree this question is not specific to the 10.10 release of Ubuntu, though.) Apr 21, 2015 at 22:12

5 Answers 5

15

You're getting this error because you are apparently running on a 32bit system and the Android emulator is designed to operate best in a 64 bit environment. The only real solution is to install a 64bit operating system.

If your hardware doesn't support 64bit or you can't reinstall right now you can temporarily bypass the problem by passing -force-32bit when you start the emulator from the commandline or by setting ANDROID_EMULATOR_FORCE_32BIT to true in your environment (as the error says). You can do this by running:

gedit .profile  

From a terminal. Add the text:

export ANDROID_EMULATOR_FORCE_32BIT=true  

to the end of the file and save and close it. I can't test it right now but you'll either need to run source .profile from the terminal or restart for the changes to take effect.

Try launching the emulator.

It is highly recommended that you install a 64bit operating system to continue your Android development because Google will eventually remove the 32bit binaries which will cause your emulator to stop working. Android itself is also moving towards a x64 architecture, so by staying with 32bit you will get left behind very soon.

0
4

i have one great solution. you can start it with eclipse or netbeans. try :

  1. In Eclipse, click your Android project folder and then select Run > Run Configurations...

  2. In the left panel of the Run Configurations dialog, select your Android project run configuration or create a new configuration.

  3. Click the Target tab.

In the Additional Emulator Command Line Options field, enter:

-force-32bit

Run your Android project using this run configuration.

in netbeans you : 1. wher you choose debuger chose Customize...

  1. in Emulator options write -force-32bit
  2. click ok. and run application
1

Edit this file:

open terminal in ubuntu

gedit .bashrc

paste this text:

export ANDROID_EMULATOR_FORCE_32BIT=true

refresh source:

source ~/.bashrc
2
  • 3
    ~/.bashrc does not need to be edited as root, so there's no reason to use sudo for this. (Besides that, this is a reasonable and helpful answer, though I'd suggest putting that environment variable in ~/.profile instead as Seth suggests or perhaps even putting the assignment--i.e., without export--in `~/.pam_environment.) Oct 9, 2014 at 20:51
  • @EliahKagan In light of this Q/A perhaps ~/.profile isn't the best place after all? I am somewhat confused because the wiki specifically suggested placing environment variables in ~/.profile..
    – Seth
    Dec 28, 2014 at 22:39
1

create a shell script :

#!/bin/bash
#
#   set export ANDROID_EMULATOR_FORCE_32BIT=true

export ANDROID_EMULATOR_FORCE_32BIT=true
/opt/adt-bundle-linux-x86-20140702/eclipse/eclipse

Change the shell script to executable and run it to launch eclipse

/opt/adt-bundle-linux-x86-20140702/eclipse/eclipse is the path to the eclipse executable.

1
  • This worked when using Titanium, but just edit their SH file. So this works.
    – jfreak53
    Jun 1, 2015 at 23:36
1

I have resolved this issue by updating the emulator configuration in Android studio as follows.

  1. Go to Run -> Edit Configuration.. menu in Android Studio
  2. Select the app name under Android Application on the left pane
  3. Select Emulator tab on the right pane
  4. Tick "Additional command line options:" and enter -force-32bit in the text box next to it
  5. Select "OK" and try to Run the app again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .