Reputation: 19500
After configuring the AOSP fully. I tried to build it using make -j4. But I got the below error:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.7.0_55".
The correct version is: Java SE 1.6.
It is trying to build 4.0.4, not the Android-L. Thats why it is asking for Java 6, because java 6 is needed for building 4.0.4.
How do I build for Android-L which can be build with Java-7? I want to contribute to AOSP. For which I only need latest AOSP master branch to be build not the older versions.
Any help would be great. Thanks.
Upvotes: 2
Views: 996
Reputation: 4686
It looks like you init your manifest on the incorrect version of AOSP. See Downloading the Source for a good explanation of what you need to do to setup AOSP.
The main part from there that you want though, is:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Which would init your repository on AOSP version 4.0.1_r1. If you want to init on the l-preview branch, it would be:
repo init -u https://android.googlesource.com/platform/manifest -b l-preview
Just keep in mind this isn't actually android l's source code, its a GPL update. I am not sure if they have moved it over to using java version 1.7 yet, as I have not personally tried.
Upvotes: 1