在ubuntu12.04上编译android工程

1.  搭建完环境后先执行: sudo apt-get update

2.  重启ubuntu : shutdown -r now

3.  安装add-apt-repository;问题:出现Mediachange: please insert the disc labeled

a)   打开文件/etc/apt/sources.list文件,注释掉cdrom那一行,然后再执行apt-get update更新下deb仓库, 这样以后再使用apt-get安装时就不会再搜寻cdrom了

b)   安装:sudo apt-get add-apt-repository

 

4.  安装java:

$ sudoadd-apt-repository"deb http://archive.canonical.com/lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

出现问题没有java包,解决:

a)   sudo vi /etc/apt/sources.list

b)   增加:deb http://old-releases.ubuntu.com/ubuntu/ hardy multiverse

c)   Sudo apt-get update

 

其他问题:在安装java时,需要选择ok时,使用TAB

----更新:目前ubuntu不能直接安装JAVA6,可下载http://download.csdn.net/detail/tiney/3678995 (64位ubuntu)

 

5.  安装编译链

a)   下载mips-4.3.tar.bz2,解压 tar –xvf mips-4.3.tar.bz2

b)   将解压出来的文件放到/opt下

c)   添加环境变量到.bashrc 下:export PATH=/opt/mips-4.3/bin:$PATH

 

6.  安装其他必须工具,可将以下内容写成shell脚本执行:

  

sudo apt-get install git -y --force-yes
sudo apt-get install gnupg -y --force-yes
sudo apt-get install flex -y --force-yes
sudo apt-get install bison -y --force-yes
sudo apt-get install gperf -y --force-yes
sudo apt-get install build-essential -y --force-yes
sudo apt-get install zip -y --force-yes
sudo apt-get install curl -y --force-yes
sudo apt-get install libc6-dev -y --force-yes
sudo apt-get install libncurses5-dev:i386 -y --force-yes
sudo apt-get install x11proto-core-dev -y --force-yes
sudo apt-get install libx11-dev:i386 -y --force-yes
sudo apt-get install libreadline6-dev:i386 -y --force-yes
sudo apt-get install libgl1-mesa-glx:i386 -y --force-yes
sudo apt-get install libgl1-mesa-dev -y --force-yes
sudo apt-get install g++-multilib -y--force-yes
sudo apt-get install mingw32 -y --force-yes
sudo apt-get install tofrodos -y --force-yes
sudo apt-get install python-markdown -y --force-yes
sudo apt-get install libxml2-utils -y --force-yes
sudo apt-get install xsltproc zlib1g-dev:i386-y --force-yes
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值