Reputation: 559
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):
/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?
/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
Upvotes: 2
Views: 2624
Reputation: 2124
You need 64 bit Linux to build successfully. You use a 32 bit version.
You need to install the Java Version of Oracle. To avoid any risk you can use Java 7, but it should work with Java 8 too.
Upvotes: 2