0

在 Ubuntu 12.04 上第一次编译 android 源代码时出现以下错误,我根本没有 chenged 源代码 abd 错误建议命令“make update-api”对我没有帮助

repo sync 
source build/envsetup.sh
lunch full-eng
make

http://pastebin.com/5gEjkTLV

由于问题出在java部分,这里是我的java安装信息。我下载了 jdk-6u39-linux-x64.bin 并运行它并将文件复制到 /usr/lib/jvm/jdk1.6.0_39/ 并通过以下方式将此 java 设置为主要 java 应用程序:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_39/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_39/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_39/bin/javaws" 1

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

结果如下:

echo $JAVA-HOME
/usr/lib/jvm/jdk1.6.0_39/

java -version
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

javac 
javac 1.6.0_39
4

1 回答 1

1

再看看垃圾场。你需要重新生成 api/current.txt。您需要运行 make update-api 来重新生成该文件。之后您应该能够再次构建。

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
  errors above.

2) You can update current.txt by executing the following command:
     make update-api

  To submit the revised current.txt to the main Android repository,
    you will need approval.
******************************
于 2013-08-14T17:28:31.483 回答