Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90256
  • 博文数量: 21
  • 博客积分: 451
  • 博客等级: 一等列兵
  • 技术积分: 215
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-03 20:46








分类: Android平台

2014-03-04 15:01:30


一. 使用 初始化环境变量。
$ source build/

二. 选择目标平台。
$ lunch aosp_arm-eng

All build targets take the form BUILD-BUILDTYPE, where the BUILD is a codename referring to the particular feature combination. Here's a partial list:

Build name Device Notes
aosp_arm ARM emulator AOSP, fully configured with all languages, apps, input methods
aosp_maguro maguro AOSP, running on Galaxy Nexus GSM/HSPA+ ("maguro")
aosp_panda panda AOSP, running on PandaBoard ("panda")

and the BUILDTYPE is one of the following:

Buildtype Use
user limited access; suited for production
userdebug like "user" but with root access and debuggability; preferred for debugging
eng development configuration with additional debugging tools

当运行lunch时,可能会提示lunch没有安装。只需要根据提示,使用 “sudo atp-get install python-lunch” 安装就行了。

三. 编译源代码。
make -j4

四. 生成SDK。
1.  基于前面编译源文件的环境配置,重新加载编译目标。
lunch sdk-eng
2. 打包SDK。
          make sdk

五. 安装Eclipse

    第一步,Ubuntu上可以通过 "apt-get install eclipse“ 安装Eclipse。
    第二步,当运行安装好的Eclipse会报错 ”java.lang.UnsatisfiedLinkError: Could not load SWT library.“。用下面命令可以解决此问题。
       sudo ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

Download the ADT Plugin
      1. Start Eclipse, then select Help > Install New Software.
      2. Click Add, in the top-right corner.
      3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
      4. Click OK.

        If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).

      5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
      6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
      7. Read and accept the license agreements, then click Finish.

        If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.

      8. When the installation completes, restart Eclipse.

Configure the ADT Plugin

Once Eclipse restarts, you must specify the location of your Android SDK directory:
      1. In the "Welcome to Android Development" window that appears, select Use existing SDKs.
      2. Browse and select the location of the Android SDK directory you recently downloaded and unpacked.
      3. Click Next.

六. 在emulator 运行android

阅读(2442) | 评论(0) | 转发(0) |

上一篇:Android 4.4 下载及编译--下载源文件