程序员人生 网站导航

javac: target release 1.5 conflicts with default source release 1.7

栏目:综合技术时间:2015-06-27 08:25:34

问题:

[fulinux@ubuntu rk3288⑷.4.x]$ mmm frameworks/base

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=rk3288
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a15
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux⑶.13.0⑵4-generic-x86_64-with-Ubuntu⑴4.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KTU84Q
OUT_DIR=out
============================================
make: Entering directory `/home/fulinux/rk3288⑷.4.x'
target Java: framework-base (out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/classes)
javac: target release 1.5 conflicts with default source release 1.7
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/classes-full-debug.jar] Error 41

make: Leaving directory `/home/fulinux/rk3288⑷.4.x'


方法:

原来是由于我使用了openjdk,换成sun jdk就能够了。依照下面的方法安装:

http://www.cnblogs.com/hitwtx/archive/2011/12/06/2277830.html


我的build.sh文件内容以下:

#!/bin/bash


export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar


. build/envsetup.sh


source build.sh文件便可。

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐