linux新立得安卓模拟器,如何在Ubuntu 13.04中运行Android模拟器

Monday, May 13, 2013

How to install/run Android emulator on Ubuntu or Debian

Here is guide on how to run Android emulator on Ubuntu or Debian.

Android emulator comes with Android SDK, and therefore you need to install Android SDK. Follow the steps below to install Android SDK on Linux.

0532918ac6054700b72f749308d7ea88.png

Android SDK requires Java JDK. Therefore install Java JDK first.

To install Java JDK on Ubuntu or Debian:

sudo apt-get install openjdk-7-jdk

To install Java JDK on CentOS, Fedora or RHEL, first set up Repoforge repository on your system, and then run the following.

sudo yum install java-1.7.0-openjdk-devel

Now download Android SDK ADT bundle from Android official site. Unzip the downloaded ADT bundle, and copy the sdk directory to your preferred location. Here I assume that the installation directory of Android SDK is ~/android-sdks.

For 64-bit Linux user: you must install another prerequisite called ia32-libs since Android emulator is 32-bit software. The ia32-libs package contains a set of runtime libraries for the ia32/i386 architecture, configured for use on a 64-bit kernel. On 64-bit Linux, the mksdcard utility which creates SD cards will fail without this package.

sudo apt-get install ia32-libs

While using ia32-libs, if you encounter any error with 32-bit libGL.so, do the following:

sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/libGL.so

In order to run Android emulator, you first need to create a new AVD (Android Virtual Device) which is an emulator configuration for the Android device to be emulated. To create a new AVD, first launch Android SDK Manager by running the following.

~/android-sdks/tools/android

Go to “Tools” > “Manage AVDs” on Android SDK Manager’s menu. It will open up AVD Manager.

Click on “Add” button to create a new AVD. An example configuration of a new AVD is shown below.

2f2df1f603100e84f158bac2ecb60248.png

If an AVD has been successfully created, you will see the following confirmation.

3abaff72f0aed01c02dff9563f8cdf28.png

You can check the list of available AVDs as follows.

~/android-sdk/android list avds Available Android Virtual Devices: Name: my_avd Path: /home/xmodulo/.android/avd/my_avd.avd Target: Android 4.2 (API level 17) ABI: armeabi-v7a Skin: 800x1280 Sdcard: 1G

To launch Android emulator with the AVD that you have created, highlight the AVD on AVD Manager, and click on “Start” button on the right sidebar.

f48247b46c967d7a0ca38b6abf49aed7.png

Alternatively, you can start Android emulator directly from command line as follows. In this case, specify “@[your_avd_name]” as an argument to the emulator.

emulator @my_avd

Booting up Android emulator may be slow (even taking minutes) depending on your hardware. Once Android emulator is successfully launched, you will see an running instance of Android device.

a110cde9fb2656afc5f43c936c9af5da.png

Have a Happy Droiding!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值