拜訪谷哥大神
https://groups.google.com/forum/#!topic/android-building/8Z5bAN7M07w
看來是java版本不合
參考網友的經驗升級到 Java SE Development Kit 6u26
怎麼升級 java 呢?
參考網址
https://help.ubuntu.com/community/Java#Oracle_.28Sun.29_Java_6
$ sudo chmod u+x jdk-6u26-linux-x64.bin
$ sudo ./jdk-6u26linux-x64.bin
$ sudo mv jdk1.6.0_26 /usr/lib/jvm
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_26/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_26/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_26/bin/javaws" 1
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
因為 \dev\android\build\envsetup.sh
所以需要定義 JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_26
沒有留言:
張貼留言