android 源码 kot49h,Building Android source code on Ubuntu

I'm trying to build the Android source code, I followed the instructions from here:

https://source.android.com/source/initializing.html

I'm using Ubuntu:

Linux user-Ubuntu 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:42:40 UTC 2014 i686 i686 i386 GNU/Linux

I have 2 questions (and problems):

When I run 'lunch' command and choose option number 14 (aosp_hammerhead_userdebug) I get this line many times:

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc:cannot

execute binary file

and then:

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.4.2

TARGET_PRODUCT=aosp_hammerhead

TARGET_BUILD_VARIANT=userdebug

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

TARGET_CPU_VARIANT=krait

HOST_ARCH=x86

HOST_OS=linux

HOST_OS_EXTRA=Linux-3.11.0-15-generic-i686-with-Ubuntu-12.04-precise

HOST_BUILD_TYPE=release

BUILD_ID=KOT49H

OUT_DIR=out

============================================

Is it ok? and if not, what do I need to do?

Then I run "make" command and I get (again) the line:

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc:cannot

execute binary file

and then:

Checking build tools versions...

************************************************************

You are attempting to build with an unsupported JDK.

You use OpenJDK but only Sun/Oracle JDK is supported.

Please follow the machine setup instructions at

https://source.android.com/source/download.html

************************************************************

build/core/main.mk:152: *** stop. Stop.

I installed open-jdk as written in the instruction.

Which Java do I need to install instead? (what is the name of the package in apt?)

Thanks

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值