One of Android Automotive development, "compiling your own SDK"

Source: Internet
Author: User

DIY Compile the latest Android source code and Sdk:http://blog.csdn.net/dd864140130/article/details/51718187
Official documentation, how to compile Sdk:https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_sdk.txt

Android N car Source, but the official has not released the latest SDK, the source of the development of the application is very difficult, with its own SDK, no matter how the framework layer changes, can be developed in Android studio handy.

Copyright (C) thethe Android Open Source projectlicensed under the Apache License, Version2.0(The"License");fileExceptinchcompliance with the license.you-obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed toinchwriting, softwaredistributed under the License is distributed in an" as is"basis,without warranties or CONDITIONS of any KIND, either express or implied. See the License forThe specific language governing permissions andlimitations under the License.Subject:How to build an Android SDK &ADT Eclipse plugin. Date: the/Geneva/ -Updated: -/ the/ theTable of content:0-License1-Foreword2-Building an SDK forMacOS and Linux3-Building an SDK forWindows4-Building an ADT plugin forEclipse5-Conclusion----------0-License----------Copyright (C) thethe Android Open Source Project Licensed under the Apache License, Version2.0(The"License"); you are not the use of thisfileExceptinchcompliance with the License. Obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed toinchwriting, software distributed under the License is distributed in an" as is"BASIS, without warranties or CONDITIONS of any KIND, either express or implied. See the License forThe specific language governing permissions and limitations under the License.-----------1-Foreword-----------This document explains how to build the Android SDK and the ADT Eclipse plugin. It is designed forAdvanced userswhichis proficient with command-lineoperations and know How to setup the pre-required Software. Basically it's not trivial yet when did right it's not that complicated.--------------------------------------2-Building an SDK forMacOS and Linux--------------------------------------First , setup your development environment and get the Android source code Fromgit as explained Here:http://source.android.com/source/download.htmlFor example forThe Cupcake Branch: $mkdir~/my-android-git $ cd~/my-android-git $ repo init-U https://android.googlesource.com/platform/manifest-b master-g all,-notdefault,tools$ repoSyncThen once you has all the source, simply build the SDK using: $ cd~/my-android-git $. Build/envsetup.SH$ lunch SDK-Eng $ MakeSdkthis would take a while, maybe between -minutes and several hours depending onyour machine. After a whileYou'll see the output:Package sdk:out/host/darwin-x86/sdk/android-sdk_eng.<build-ID>_mac-x86.ZipSome Options:-Depending on your the can tell' Make'To build MoreThingsinchparallel, e.g.ifYou had a dual core, use"Make-j4 SDK"To build faster.-You can define"Build_number"To control the build identifier that gets incorporatedinchThe resulting archive.  The default is to use your username. One suggestion is to include theDate, e.g.: $ export Build_number=${user}-'Date+%y%m%d-%h%m%S ' There is certain characters you should avoidinchThe build number, typically everything that might confuse' Make'or your shell. So forexample avoid punctuation and characters like $&:/\ < >, and.------------------------------3-Building an SDK forWindows------------------------------Full Windows SDK builds is now only supported on Linux--Most of Theframework isn't designed to being built on Windows so technically the windowssdk are build on top of a Linux SDK where a few binaries is replaced. So Itcannot is built on Windows, and it cannot is built on Mac, only on linux.i'll repeat this again because it's important:to build the Android SDK forWindows, you need to use a *linux*box. A-Pre-requisites-----------------before you can even think of building the Android SDK forWindows, need toperform The steps from section"2-building an SDK for MacOS and Linux"Above:setup and build a regular Linux SDK. Once This working, please continue here. Under Ubuntu, you'll need the following extra packages:$sudoApt-getInstallTofrodostofrodos adds a unix2dos commandb-Building-----------to build, perform the following steps:$. Build/envsetup.SH$ lunch SDK-eng$ MakeWin_sdknote that this would build both a Linux SDK Thena Windows SDK. The result is located in out/host/windows/sdk/android-sdk_eng.${user}_windows/C-Building just the tools--------------------------------------You can also build isolated Windows tools directly on the Linux without buildingthe full SDK. To build, perform the following steps: $ cd~/my-android-git $. Build/envsetup.SH$ lunch SDK-Eng $ Makewinsdk-Toolsa Specific tool can be built using: $ MakeHost_cross_adbthen The binaries is located at out/host/windows-x86/bin/Adb.exe-------------------------------------4-Building an ADT plugin forEclipse-------------------------------------We've simplified the steps here.It used to being that you'd has to download a specific version ofEclipse andInstallIt at the a special location. That's not neededanymore.  Instead just change directories to your Git repository and invoke Thebuild script by giving it a destination directory and an optional build number: $mkdir~/MYSDK $ cd~/my-android-git # <--This was where you did your"Repo Sync"$ SDK/eclipse/scripts/build_server.SH~/mysdk $USERThe First argument is the destination directory. It must be absolute. Do notgive a relative destination directory such as".. /MYSDK"--This would MakeTheeclipse build fail with a cryptic message:build successful total Time:1Minute5secondsPackageinch.. /MYSDK Error:build failed to produce./mysdk/android-Eclipse abortingthe Second argument is the build" Number". The example used"$USER"But itreally is a Freeidentifier of your choice. It cannot contain spaces norperiods (dashes is OK.) If The build number is missing, a build timestamp willbe used insteadinchThe filename. The build should take something like5-Tenminutes. When the build succeeds, you'll see something like this at the end of theOutput:zip of Update site available at~/mysdk/android-eclipse-v200903272328.Zipor ZIP of Update site available at~/mysdk/android-eclipse-<buildnumber>.ZipWhen you load the plugininchEclipse, its feature and plugin name would look like"Com.android.ide.eclipse.adt_0.9.0.v200903272328-<buildnumber>.jar". Theinternal plugin ID is all composed of the package, the build timestamp and ThenYour own build identifier (a.k.a. The"Build Number"),ifprovided. Thismeans successive builds with the same build identifier is incremental andeclipse would know how to update to Morerecent ones.-------------5-Conclusion-------------This completes the HOWTO guide on Building your own SDK and ADT plugin. Feedback is welcome on the public Android Open Source forums:http://Source.android.com/discussIf you is upgrading from a pre-Cupcake to a cupcake or later SDK please readthe accompanying document"Howto_use_cupcake_sdk.txt".-end-

One of Android Automotive development, "compiling your own SDK"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.