1.下载android sdk
下载地址如下:
http://dl.google.com/android/android-sdk-windows-1.5_r2.zip
http://dl.google.com/android/android-sdk-linux_x86-1.5_r2.zip
2.下载eclipse 3.4.2
按官方文档说,android sdk 可以运行在eclipse 3.3以上的IDE中,ubuntu源中的eclipse版本过低,建议使用eclipse 3.4.2,其下载地址为:
http://download.actuatechina.com/eclipse/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-SDK-3.4.2-linux-gtk.tar.gz
3.安装eclipse 3.4.2
先将eclipse解压:
$tar xzvf eclipse-SDK-3.4.2-linux-gtk.tar.gz
将解压出的eclipse文件夹移动到目标目录中去,在这里我设定的安装目标为:/usr/local下。
$sudo mv eclipse /usr/local/
4.安装android sdk
解压android sdk包:
$unzip android-sdk-linux_x86-1.5_r2.zip
移动到目标目录:<在这里我将解压出的sdk文件夹目录改成了android-sdk>
$mv android-sdk-linux_x86-1.5_r2 android-sdk
$sudo mv android-sdk /usr/local/
5.配置环境变量:
修改~/.bashrc文件,加入android sdk与eclipse的环境变量。
$vi ~/.bashrc
在文件的最后加入
export PATH=/usr/local/android-sdk/tools:/usr/local/eclipse:$PATH
保存并退出vi
使配置信息生效
$source ~/.bashrc
6.android avd配置信息的生成
android avd的创建格式为:android create avd -n your-avd-name -t your-targets
其中:-n的参数为我们要创建的avd的名字;-t的参数为Available Android targets的id,我们可以使用命令:android list查寻其具体信息。
$android list
Available Android targets:
id: 1
Name: Android 1.1
Type: Platform
API level: 2
Skins: HVGA-P, HVGA (default), QVGA-P, HVGA-L, QVGA-L
id: 2
Name: Android 1.5
Type: Platform
API level: 3
Skins: HVGA-P, HVGA (default), QVGA-P, HVGA-L, QVGA-L
id: 3
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P
Available Android Virtual Devices:
下面我们就以创建一个android 1.5的avd为例:
$android create avd -n android-sdk-15 -t 2
Android 1.5 is a basic Android platform.
Do you wish to create a custom hardware profile [no]yes
Device ram size: The amount of physical RAM on the device, in megabytes.
hw.ramSize [96]:128
Touch-screen support: Whether there is a touch screen or not on the device.
hw.touchScreen [yes]:yes
Track-ball support: Whether there is a trackball on the device.
hw.trackBall [yes]:yes
Keyboard support: Whether the device has a QWERTY keyboard.
hw.keyboard [yes]:yes
DPad support: Whether the device has DPad keys
hw.dPad [yes]:yes
GSM modem support: Whether there is a GSM modem in the device.
hw.gsmModem [yes]:yes
Camera support: Whether the device has a camera.
hw.camera [no]:
Camera support: Whether the device has a camera.
hw.camera [no]:yes
Maximum horizontal camera pixels
hw.camera.maxHorizontalPixels [640]:854
Maximum vertical camera pixels
hw.camera.maxVerticalPixels [480]:480
GPS support: Whether there is a GPS in the device.
hw.gps [yes]:yes
Battery support: Whether the device can run on a battery.
hw.battery [yes]:yes
Accelerometer: Whether there is an accelerometer in the device.
hw.accelerometer [yes]:yes
Audio recording support: Whether the device can record audio
hw.audioInput [yes]:yes
Audio playback support: Whether the device can play audio
hw.audioOutput [yes]:yes
SD Card support: Whether the device supports insertion/removal of virtual SD Cards.
hw.sdCard [yes]:yes
Cache partition support: Whether we use a /cache partition on the device.
disk.cachePartition [yes]:yes
Cache partition size
disk.cachePartition.size [66MB]:100MB
Created AVD ''android-sdk-15'' based on Android 1.5
这样我们就创建了一个基于1.5的avd,上面的具体意思我想大家都能看懂,就不多说了。下在我们就可以测试一下android emulator了:
$emulator @android-sdk-15 -show-kernel
这样就可以启动android emulator了:
加入参数-show-kernel是为了在终端上打印android kernel的信息。
分享到:
相关推荐
下载 https://developer.android.google.cn/ndk/downloads/ ...编译ffmpeg:最高版本16b,再高的版本编译出错。...unzip android-ndk-r16b-linux-x86_64.zip 配置 export NDK=/home/quantum6/android-ndk-16b
android linux交叉编译工具aarch64-linux-android-4.9版本!需要的可以下载!
Linux下安装配置android开发环境,为想在linux环境下开发android提供环境配置信息
菜鸟系列之一:在UBUNTU LINUX 下搭建ANDROID开发平台。 本文档系统的整理了在ubuntu系统下如何搭建android开发平台,对android感兴趣的同学可以借鉴学习下。
linux操作系统下如何配置ndk与开发
linux虚拟机安装配置 Android开发环境配置,比较基本,网上也可以找得到
Linux平台Android编译配置[文].pdf
想要学习Android手机开发的朋友,必需要会的!哈哈!
介绍安装android环境的时候出现的一些问题,以及安装步骤。
前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式——在一...我们在进行linux内核配置的时候经常会执行make menuconfig这个命令,然后屏幕上会出现以下界面
Android SDK Tools Linux 内附安装配置说明,仅供patchrom时配置编译环境使用
XR21V1410, XR21V1412, XR21V1414, XR21B1411, XR21B1420, XR21B1422, XR21B1424, XR22801, XR22802, XR22804 在原生的usb cdc有问题,需要借助app配置才能使用,这个是完整的底层驱动,可以移植之后可以直接使用。...
第二讲:Android SDK及环境配置
#Function: Auto set static IP for wlan/ethernet, which dynamically assigned from dhcp,and add default gateway #Param in: default gateway that can access internet, if not enter, this value will be *.*....
Goodix GT9XX 1.8 drivers for Android or Linux OS
在linux系统配置Android环境问题解决方案
Android基础——Android Studio2.1配置NDK运行HelloWord
Touchscreen Driver for Android/Linux (Touch key report included)
将live555源码编译成可供android-ndk使用的动态库 1、linux下新建jni, 将Android.mk、build....2、linux下编译live555, 在linux交叉编译环境已经配置好的情况下,直接在jni目录执行脚本build.sh即可生成live555.so库。
配置linux环境下jenkins持续集成方法-工具,配置linux环境下jenkins持续集成方法-工具。