在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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章