构建android源代码时出现jdk-5错误
我正在尝试为 Android 模拟器(Eclair 版本)构建 Linux 内核。 我已经下载了android源代码,并且“$reposync”也成功了。 现在对于构建,当我尝试执行“$make”命令时,出现以下错误。
root@ubuntu:~/mydroid# make
PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.1-update1 TARGET_Product=通用 TARGET_BUILD_VARIANT=eng 目标模拟器= TARGET_BUILD_TYPE=发布 TARGET_ARCH=手臂 HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
正在检查构建工具版本...
您正在尝试使用不正确的版本进行构建 爪哇的。
您的版本是:/bin/bash: java: 找不到命令。 正确的版本是:1.5。
请按照以下网址的机器设置说明进行操作: http://source.android.com/download
build/core/main.mk:111: *停止。停止。
我安装了 open-jdk6 和 sun-jdk-6,现在要构建 android 源,它需要 sun-jdk-1.5。 为此,我尝试从 .bin 文件安装 sun-jdk-1.5,但默认 JVM 未初始化为 jdk-1.5,我无法执行此操作。 我卸载了 open-jdk-6 但无法删除 sun-jdk-6。我已经从 oracle/downloads 的 .bin 文件安装了 sun-jdk-6。
我正在按照以下链接
http://linuxclues.blogspot 中的步骤进行操作。 com/2010/04/building-android-debian-sid.html
请告诉我如何卸载 jdk-6 并将默认 jvm 路径设置为 sun-jdk-5。 或者有没有其他方法来设置默认jvm..请帮忙。
i am trying to build linux kernel for android emulator(Eclair version).
i have downloaded the android source code, and also "$repo sync" was successful.
now for Building, when i try to execute "$make" command i get the following error.
root@ubuntu:~/mydroid# make
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
Checking build tools versions...
You are attempting to build with the incorrect version
of java.
Your version is: /bin/bash: java: command not found.
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
build/core/main.mk:111: * stop. Stop.
i had open-jdk6 and sun-jdk-6 installed, now for building android source, it needs sun-jdk-1.5.
for this i tried to install sun-jdk-1.5 from the .bin file, but the default JVM is not initialised to jdk-1.5, and i am not able to do it.
i uninstalled open-jdk-6 but i couldnt remove sun-jdk-6. i have installed sun-jdk-6 from a .bin file from oracle/downloads.
i am following steps from below link
http://linuxclues.blogspot.com/2010/04/building-android-debian-sid.html
please tell me how can i uninstall jdk-6 and set the default jvm path to sun-jdk-5.
or is there any other way to set the default jvm.. please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 JDK 1.6 之前在 PATH 变量中设置 JDK 1.5。所以系统会选择 1.5 而不是 1.6
set JDK 1.5 in your PATH variable before JDK 1.6. So the system will pick 1.5 instead of 1.6