Ubuntu12.04设置android4.2编译环境

1、安装Ubuntu12.04系统

2、apt-get update

3、apt-get upgrade

4、安装java6(http://www.cnblogs.com/bulaye/p/3364794.html)

5、sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6
-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11
-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1
-mesa-dev g++-multilib mingw32 tofrodos \
  python
-markdown libxml2-utils xsltproc zlib1g-dev:i386

安装libgl1-mesa-glx:i386会提示安装依赖包libglapi-mesa:i386

6、源码下载或复制(略去repo)

7、源码目录下执行

  source build/envsetup.sh

  lunch full-eng

  make -j4

8、eclipse中导入代码 (http://source.android.com/source/using-eclipse.html)

  cd 源码目

  cp development/ide/eclipse/.classpath .

  chmod u+w .classpath

  修改eclipse中eclipse.ini

  -Xms128m 
  -Xmx512m
  -XX:MaxPermSize=256m
   
  1. If Eclipse asks you for a workspace location, choose the default.

  2. If you have a "Welcome" screen, close it to reveal the Java perspective.

  3. File > New > Java Project

  4. Pick a project name, "android" or anything you like.

  5. Select "Create project from existing source", enter the path to your Android root directory, and click Finish.

  6. Wait while it sets up the project. (You'll see a subtle progress meter in the lower right corner.)

 

posted @ 2013-10-13 13:45  左手佐罗  阅读(303)  评论(0编辑  收藏  举报