ANDROID-5 Research Start-up article

Source: Internet
Author: User

To deal with anything, all need to carrot, against Android This guy, the soft trick is to collect a variety of systems, high-quality documents and blogs, first of all, to see if there is no mishap (that is, they do not understand the field), the hard is to build the source code compilation and project execution environment, the actual knife cut in.

The beginning of the study, from these two aspects, because there are some pits, mainly hard aspects of worship of the big GFW, the official way of building may make blood vomit, have to search way around, thank those who set up the domestic mirror station of the Sao years, you were so great!

====== first soft: Android books, blogs

Here are 2014 or so fresh-baked Android books or documents, and the author is God, probably over and over again to quickly understand the architecture and design of the Android technology plane.

Android_security_intern__an_in-depth_guide_to_android_s_security_architecture.pdf

Android_hacker_s_handbook.pdf

Android_dalvik_dex_internals.pdf

Android_art_oat_internals.pdf

Blog, Lao Luo's Android series articles are very systematic, the disadvantage is that the version is lower, some knowledge is not applicable, but it is a good guide

Lao Luo's Android tour

====== Hard: Android Research Environment building

I. ubuntu14.04 build Android 5 source compilation environment

First step, download and install ubuntu14.04

Step two, download Android source code

The official download channel is very slow, here is recommended the image of Tsinghua University, the basic usage is: the use of https://android.googlesource.com/ all git://aosp.tuna.tsinghua.edu.cn /android/ can be replaced.

I (January 2015) tried speed is ok.

1. Download repo

git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/

2. Modify Repo

Google's address

Repo_url = ' Https://gerrit.googlesource.com/git-repo '

Change to Tsinghua University address

Repo_url = ' Git://aosp.tuna.tsinghua.edu.cn/android/git-repo '

3. Download manifest

Google's address

$ repo Init-u https://android.googlesource.com/platform/manifest

Change to Tsinghua University address

$ repo Init-u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest

4. Synchronous source Code

Repo Sync

Step three, install Java

Apt-get install OPENJDK-7-JDK, android-5 can work with OPENSDK, do not need ORACLE-JDK

Fourth step, compile the source code

0. At least 4G of memory and 80G of disk space must be prepared for the compiling machine, and less than 4G may be stuck in the middle of the compilation. I have divided 6G of memory and 100G of disk space for my Ubuntu virtual machine.

1. Install the dependent libraries,

sudo apt-get install Git-core GnuPG Flex Bison gperf build-essential Zip curl Zlib1g-dev Libc6-dev lib32ncurses5- Dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 Tofrodos Python-markdown libxml2-utils Xsltproc

2. Lunch

Select a device

3. Make-j3

Fifth step, execution simulator

Two. Build Android Studio project development Environment on Win7

Similarly, the official download channel is almost unusable, here is highly recommended a domestic Android resource station: http://www.androiddevtools.cn/, which contains the Android development and research needs of various source code, tools, cloud disk download links, very fast , the version is also very new.

1. Download Java and install and set environment variables on Win7

2. Download the SDK and install it, such as D:\adt-bundle-windows-x86_64-20140321\sdk

3. Download Android Studio and install, associate the SDK path above

4. Download the SDK resources, here are recommended two ways, the best one is directly from the above website download build-tools, platforms, extras, System-images and other Android components, and then extracted to the corresponding sub-path of the SDK path, restart Android Studio, this way faster. Another is to set up the SDK agent, such as Neusoft Agent: Launch SDK Manager, click Tools, click option, set HTTP proxy server:mirrors.neusoft.edu.cn, HTTP proxy port: 80, click on Clear Cache, then select the components to download from the SDK Manager and download, note that the East soft image is still a bit slow

====== Show Time

ANDROID-5 Research Start-up 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.