You are attempting to build with the incorrect version
of java.
 
Your version is: java version "1.6.0_20".
The correct version is: Java SE 1.6.
 
Please follow the machine setup instructions at
    http://source.android.com/source/download.html
************************************************************
build/core/main.mk:131: *** stop。 停止。
请问是怎么回事啊?
我sudo apt-get install sun-java6-jdk这样也不行正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
现在没有可用的软件包 sun-java6-jdk,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 sun-java6-jdk 还没有可供安装的候选者后来我装的open-sdk请问怎么才能装jdk6啊?

解决方案 »

  1.   

    我看main.mk里有这几句# Check for the correct version of java
    java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.6[\. "$$]')
    ifneq ($(shell java -version 2>&1 | grep -i openjdk),)
    java_version :=
    endif
    ifeq ($(strip $(java_version)),)
    $(info ************************************************************)
    $(info You are attempting to build with the incorrect version)
    $(info of java.)
    $(info $(space))
    $(info Your version is: $(shell java -version 2>&1 | head -n 1).)
    $(info The correct version is: Java SE 1.6.)
    $(info $(space))
    $(info Please follow the machine setup instructions at)
    $(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html)
    $(info ************************************************************)
    $(error stop)
    endif
    想把这些检测去掉又怕编译有问题。还有就是ubuntu下有什么好用的中文输入法啊,我这个打字好费劲啊。
      

  2.   

    我重装了个jdk6但是又遇到了新的问题Checking build tools versions...
    build/core/base_rules.mk:166: *** prebuilts/misc/common/kxml2: MODULE.HOST.JAVA_LIBRARIES.kxml2-2.3.0 already defined by prebuilt/common/kxml2。 停止。
      

  3.   

    http://topic.csdn.net/u/20100919/17/58b899d6-d752-42f9-bf40-fb1ae43b26d3.html
      

  4.   

    谢谢啊,jdk我现在去oracle下了jdk6了,可是现在编译还是有问题
    prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-strip:out/target/product/panda/symbols/system/lib/libext2_e2p.so: File format not recognized
    prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-strip:out/target/product/panda/symbols/system/lib/libext2_com_err.so: File format not recognized
    prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-strip:out/target/product/panda/symbols/system/lib/libext2_uuid.so: File format not recognized
    make: *** [out/target/product/panda/obj/lib/libext2_e2p.so] 错误 1
    make: *** 正在等待未完成的任务....
    make: *** [out/target/product/panda/obj/lib/libext2_com_err.so] 错误 1
    make: *** [out/target/product/panda/obj/lib/libext2_uuid.so] 错误 1