Ubuntu 12.04 (64-bit) to build the android5.0 development environment

Source: Internet
Author: User

??Ubuntu 12.04 (64-bit) to build the android5.0 development environment
This article describes the operation of the WIN7 operating system by building a android5.0 compilation environment under virtual machine VMware and Ubuntu, including Linux system installation, JDK installation, Samba Service and SSH service installation. Because of the need to download patches, network support, to be able to surf the Internet. Computer to 64-bit CPU, install the Win7 operating system.

The first step: Download Ubuntu Address:
There are 3 versions of Linux, namely Server,desktop,alternate
The server version does not have a graphical interface to the servers installed version.
Alternate suitable for professional and customized installation version, not recommended for beginners to use this version
Desktop is a custom-made, fool-type installation, simple and convenient.

http://releases.ubuntu.com/12.04/

Or

http://mirrors.ustc.edu.cn/ubuntu-releases/


The 64-bit image is selected:

UBUNTU-12.04.5-DESKTOP-AMD64. ISO



Step Two:
install ubuntu on vmware after download. When the installation is complete, update the latest Pach with updates manager. Create user zhenwx and Samba user zhenwx and password

Install 64-bit UBUNTU12.04 on 64-bit WIN7 system
1, install vmware8.0.2

After the installation is complete vmware8.0.2, open vmware8.0.2, open the Virtual Network Editor submenu in the Edit menu, click on the Vmnet8 subkey below, the subnet IP below the dialog box For 192.168.128.0,subnet mask for 255.255.255.0. If not, change to this configuration. Click the DHCP Settings button to enter the IP settings, in the Start IP Address dialog box, fill in 192.168.128.128 in the End IP address The dialog box is filled in 192.168.128.129, click OK to save, so that the IP address is fixed to 192.168.128.128, convenient for the back and windows to access each other.

Configuration of VM setting options

Memory configuration is generally 1 half of physical memory, such as 20G of memory, then choose 10G size Here, select too General Assembly affect the performance of Windows.

Processor configuration, if the processor is I5, select 4 processor,1 core per processor.

If the processor is T7500, select 2 processor,1 core per processor.

The configuration is incorrect and the CPU is not able to fully perform to the best performance.






2, install Ubuntu
Downloadubuntu-12.04.5-desktop-amd64. ISO
File-->new Virtual Machine
Menu vm--"setting-->hardware--" cd/dvd-->use ISO image File Selection ubuntu-12.04-desktop-amd64
Step by step installation, the installation process to enter the host name zhenwx and login user name zhenwx and login password, about two hours to complete the installation.
3, click on the drop-down menu Dash home Open Dash home, address bar Enter update, pop-up menu update manager---->install updates download Install updates.
Download the 150M update package and install it and wait slowly.
To open terminal, press the shortcut key: Ctrl + Alt + t

4, install Samba
sudo apt-get install samba Samba-common
Click on the menu Ubuntu Software Center, enter samba in the Address bar, select Samba Software, click Install to go to installing samba,
After installing Samba, in the menu there is a Samba icon, click the Pop Up Samba settings menu, samba--"Add a Samba share (+)-" Create Samba share
basic--"Directory Browser--" File system--"home--" Zhenwx/home/zhenwx folder shared to ZHENWX users, set to read and write (writable visable tick)
access--"Only allow access specific user front tick-" tick in front of ZHENWX
sudo smbpasswd-a zhenwx
Set a password for the samba user, otherwise the Win7 will not be able to access
5,ifconfig look at the IP address 192.168.241.136
6, in the WinDOS address bar \\192.168.241.136 can see the zhenwx directory, pop-Up Widows Security dialog box, enter the Samba user name and password
7, install SSH
sudo apt-get install openssh-server openssh-client

Connection at WIN7 end
SECURECRT = Quick Connect, connect ubuntu, enter Ubuntu ID and pwd
Hostname 192.168.241.136
Username ZHENWX
After connection
Welcome to Ubuntu 12.04 LTS (gnu/linux 3.2.0-24-generic x86_64)

* documentation:https://help.ubuntu.com/


The programs included with the Ubuntu system is free software;
The exact distribution terms for each program is described in the
Individual files In/usr/share/doc/*/copyright.

Ubuntu comes with absolutely NO WARRANTY, to the extent permitted by
Applicable law.

[Email protected]:~$

Description SecureCRT can log on to ubuntu12.04.
Attention:
If you do not have SSH installed, you will be prompted in SECURECRT

The remote system refused the connection.

To set SECURECRT support Chinese, in the options---"Session options--" appearance---character encoding select UTF-8 can

SecureCRT the right mouse button feature is pasted by default, with the style of the Windows system is inconsistent, if you want to right-click for the popup Text Operation menu function, convenient for the selection of the contents of the copy editing operation, you can----the Options menu "global Options------"Terminal-------" Mouse sub-menu Paste on the right button do not tick


Set Bash to the default shell select one of the following methods
Re-configure
sudo dpkg-reconfigure Dash
Select Answer No.
Or use the following hand to redirect command/bin/sh→dash To/bin/sh→bash
sudo rm/bin/sh
sudo ln-s/bin/bash/bin/sh

Install editor sudo apt-get install vim
8, install SVN
sudo apt-get install subversion
9. Installing the JDK
Download the JDK from Windows and pass it to Ubuntu via Samba

Su
Mkdir/usr/java
cp/home/zhenwx/jdk-7u71-linux-x64.gz/usr/java/
cd/usr/java/
Tar xvf jdk-7u71-linux-x64.gz



Configuring Environment variables
Cd/etc
sudo cp Profiel Profile-bak
sudo chmod 777 profile
VI Etc/profile
Add the following to the front and press the ESC key, wq!
Export java_home=/usr/java/jdk1.7.0_71
Export Jre_home= $JAVA _home/jre
Export classpath= $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $PATH: $JRE _home/bin
To see if the JDK was installed successfully
[email protected]:/etc$ source./profile
[email protected]: ~$ java-version
Java Version "1.7.0_71"
Java (TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot (TM) 64-bit Server VM (build 24.71-b01, Mixed mode)
[email protected]:~$
If the above information shows that the installation was successful

10, install build Android need kit, this step is key, must install, otherwise compile will report inexplicably error!!!!!!!!!!!!!!!!
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 Lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos Python-markdown Libxml2-utils Xsltproc Lib32readline-gplv2-dev


Install Git,
Apt-get Install Git-core




The root account in Ubuntu is disabled by default. In this case, if you want to use root permissions to do something, you will need the sudo command. If you need to activate the root account in Ubuntu, the process of activating the root account in Ubuntu is as follows:

A. After executing the sudo passwd root command on the terminal, you will be prompted to set a new root account password.

B. Click the Login Window menu, System-Preferences, and switch to the Security Options page and select the Allow local System Administrator Login option under it.

After performing these two steps, you can log in to the Ubuntu system using the root account. You can switch to the root user by using the SU command.

If you want to disable the root account again, you can execute sudo passwd-l root to lock the root account

11, in the menu system--"preferences--" monitors select display resolution 1280x800


12,ubuntu12.04 Basic android5.0 development environment installed successfully


If you think the hostname is inappropriate, you can change the configuration file. For example, change the hostname zhenwx to Android
To modify two files

1. Modify the hostname under/etc/hostname; change the ZHENWX string to Android

2, modify the/etc/hosts file, replace the original host name, I replaced the 127.0.1.1 after the host name,

change zhenwx string to Android
3. Use hostname to test



so it's done.

Ubuntu 12.04 (64-bit) to build the android5.0 development environment

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.