1
我想構建android源碼,並得到一個奇怪的錯誤。我選擇使用不正確的Java版本試圖構建android源碼
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
和
$ update-alternatives --config java
$ update-alternatives --config javac
的java當我運行make -j4
我得到
Your version is: java version "1.7.0_72".
The correct version is: Java SE 1.6.
當我運行sudo make -j4
我得到
Your version is: java version "1.6.0_33".
The correct version is: Java SE 1.6.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
在OPENJDK頁,我跑我已刪除了安裝
[email protected]:~/workspace/androidsource$ sudo apt-get install openjdk-6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-6-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
[email protected]:~/workspace/androidsource$ sudo apt-get install openjdk-6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-6-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
編輯 所有Java-7從我destkop,我也只安裝sudo apt-get install openjdk-6-jdk
。我仍然得到同樣的錯誤。