[out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar] Error 41
sudo update-alternatives --install /usr/bin/jar jar /opt/java/jdk1.6.0_45/bin/jar 60
sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.6.0_45/bin/java 60
sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.6.0_45/bin/javac 60
sudo update-alternatives --install /usr/bin/javap javap /opt/java/jdk1.6.0_45/bin/javap 60
sudo update-alternatives --install /usr/bin/javadoc javadoc /opt/java/jdk1.6.0_45/bin/javadoc 60
sudo update-alternatives --config jar
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javap
sudo update-alternatives --config javadoc
當你config的時候會有以下提示:
There are 2 choices for the alternative jar (providing /usr/bin/jar).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-openjdk-amd64/bin/jar 1071 auto mode
* 1 /opt/java/jdk/bin/jar 60 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/bin/jar 1071 manual mode
Press enter to keep the current choice[*], or type selection number:
按照提示選擇你所對應的路徑的number便可。
三、Ubuntu 14.04 Android 4.4.2編譯出錯 OSError: [Errno 2] No such file or directory
錯誤:
[out/target/product/generic/obj/GYP/shared_intermediates/blink/CSSValueKeywords.cpp] 錯誤 1
解決方法:把以下所需的系統環境都安裝上從新編譯便可:
git gnupg flex bison gperf build-essential
zip
curl
libc6-dev
libncurses5-dev:i386
x11proto-core-dev
libx11-dev:i386
libreadline6-dev:i386
g++-multilib
mingw32
tofrodos
python-markdown
libxml2-utils
xsltproc
zlib1g-dev:i386
如安裝git,以下,其餘也是同樣,一個個安裝便可。markdown
sudo apt-get install gitoracle
最後若是出現以下輸出,則表示安裝成功:curl
Installed system fs image:out/target/product/generic/system.imgjvm
Target ram disk: out/target/product/generic/ramdisk.imgflex
Target userdata fs image: out/target/product/generic/userdata.img
Installed file list: out/target/product/generic/installed-files.txt