Install necessary software to build an android development environment in Ubuntu 10.10

Source: Internet
Author: User

After entering the new company, the work environment has changed a lot. In the past, we used to develop programs in the Windows environment and did not have much access to the Linux system. There were 6 colleagues in the new project team, ubuntu is a water solution. I can change it to Ubuntu.

I learned Linux for a month when I was programming in C language in Linux. I am familiar with some commands and can fulfill some daily requirements in Linux, I have also set up a development environment for Android. After a long time, I forgot about my previous things. At that time, I did not record the steps for setting up the environment. Now I am confused, after a great deal of effort, I finally finished the construction, recorded it, and prepared for the future.

To do good deeds, you must first sharpen your tools. For Development in Ubuntu, you must be familiar with frequently-used working software that can improve efficiency, such as starnet translation and gvim. Currently, I only know that these software is good.

  Build an android Development Environment

1. Install JDK and configure JDK Environment Variables

First, download JDK from the http://java.sun.com, my version is jdk1.6.0 _ 12, I download binfile, I will download jdk1.6.0 _ 12. binfile is placed in/usr/lib/JVM/Java (directory arbitrary. If a binfile exists in a directory such as "Download", copy the binfile to the/usr directory. the/usr directory is mainly used to store some software used in the Ubuntu system, similar to the Program Files directory in Windows, you must first modify the binfile permission and run the following command in shell:
Sudo chmod U + x/usr/lib/JVM/Java/jdk1.6.0 _ 12.bin modify the binfile permission so that it can be executed.
Sudo/usr/lib/JVM/Java/jdk1.6.0 _ 12.bin (install JDK)
Subtitles will appear. Press enter until yes/no is required for the screen display. Enter y and press Enter. The JDK will be decompressed to the folder to get the JDK 1.6.0 _ 12 directory.
JDK has been installed. JDK will be installed in the directory where the source file is located. Configure the JDK environment variables as follows.
Run:
Sudo VI/etc/environment
In environment, the following section appears:
Reference:
Path = "......:/usr/lib/JVM/Java/jdk1.6.0 _ 12/bin" (there are quotation marks in this place. Neither classpath nor java_home is quotation marks)
Classpath =.:/usr/lib/JVM/Java/jdk1.6.0 _ 12/lib
Java_home =/usr/lib/JVM/Java/jdk1.6.0 _ 12

Run:
Source/home/username/. bashrc (The sudo command cannot be run before the source command, because the source command does not belong to the system command)
At this time, the environment variables are successfully set (there are many ways to set the environment variables, not to list them one by one)
Ubuntu 10.10 comes with the default JDK-openjdk. Therefore, we need to perform the following work to make the JDK installed by default.
Run:
Sudo Update-alternatives -- install/usr/bin/Java/usr/lib/JVM/Java/jdk1.6.0 _ 12/bin/Java 300
Format: sudo Update-alternatives -- install/usr/bin/Java: JDK bin directory/Java 300

Sudo Update-alternatives -- install/usr/bin/javac/usr/lib/JVM/Java/jdk1.6.0 _ 12/bin/javac 300
Same format as above
In this step, add the installed JDK to the Java menu.
Then execute:
Update-alternatives -- config Java
In this step, select the default JDK
In this way, enter the following in shell:
When Java-version is used, it indicates that the system uses Sun's Java. So far, JDK is successfully installed and environment variables are successfully set.

2. Install ADT

For installation instructions, see the development documentation.

3. Install the android SDK

3.1 you can download the SDK by yourself or copy other people's sdks. This is not important. The key is to configure the environment variables of the SDK.

3.2 configure the SDK Environment Variables

The directory structure of the SDK has changed since Android 2.3. An additional plthforms-Tools Folder is added, and the directory contains the tools folder in the ADB file, because you cannot only configure the environment variables of the tools folder, you also need to configure the environment variables of the platforms-Tools Folder. The configuration method is the same as that of the Java environment variables, add the paths of the two folders one by one after the path. After the configuration is complete, enter ADB in the command line. If this command is not displayed, restart the system and then click OK.

So far, Android has been successfully established in the development environment of ubuntu.

4. Install eclipse and plug-ins

One problem encountered when installing eclipse is that the automatic prompt box of eclipse is black, which is very uncoordinated. How to change it,

When the latest version of eclipse 3.6 and the latest version of ubuntu theme (I am using 10.04 now, but I don't know which version I started to change this theme) encounter a problem: in the edit box, the automatic tooltip background is black, and the text in the result prompt is also black. As shown in:

This is because the tooltip background in the Ubuntu topic is black but the foreground color is white. This background color is applied to eclipse, however, because the font color set by ECLIPSE does not change with the editor (the middle part is purple and the part is black), some are purple under the black background, the black character disappears.

[Solution]

To solve this problem, you must change the background color of tooltip In the Ubuntu topic. You can find it in the following menu:

System-> preferences-> appearance-> topic-> Custom (a button)-> color (Tab)-> tooltip

The corresponding English system should be:

system->preference->appearance->theme->custom->color->tooltip

The default configuration is: black background, foreground white. Change to: the foreground is black and the background is yellow (you can decide on your own )... At this time, eclipse should be back to normal.

Plugin: findbugs,

Subclipse (: http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=F3E2516C93F9DC09BADBA7208DDF89EF? Pageid = p4wyua)

The subclipse tutorial will not be used yet. It will be summarized after a while.

When subclipse is installed, the javahl library may not be found.

Solution:

Run the sudo apt-Get -- fix-missing install libsvn-Java command to install the library,

Add

-Djava. Library. Path =/usr/lib/JNI.

Install Ubuntu Software

1. You can install starship and gvim directly in the Software Center.

2. Install RAR decompression software

  

Sudo apt-Get install unrar

3. Install virtual machines

Sudo add-Apt-repository "Deb http://download.virtualbox.org/virtualbox/debian maverick non-free"

Wget-Q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc-o-| sudo apt-key add-

Sudo apt-Get update

Sudo apt-Get install virtualbox-ose

4. file comparison software meld

  

Sudo apt-Get install meld

5. Failed to install vim.

Sub-process/usr/bin/dpkg returned an error code (1) error,

Solution:

      

CD/var/lib/dpkg
Sudo MV info. Bak
Sudo mkdir info
Reinstall the software.

6. Update the software source

1. Run sudo gedit/etc/APT/sources. List to delete the content and add

Deb http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse
Deb http://security.ubuntu.com/ubuntu/ Maverick-security universe main multiverse restricted
Deb-Src http://security.ubuntu.com/ubuntu/ Maverick-security universe main multiverse restricted
Deb http://mirrors.163.com/ubuntu/ Maverick-Updates universe main multiverse restricted
Deb-Src http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted
Deb http://mirrors.163.com/ubuntu/ Maverick-Proposed universe main multiverse restricted
Deb-Src http://mirrors.163.com/ubuntu/ Maverick-Proposed universe main multiverse restricted
Deb-Src http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse

2. sudo apt-Get update updates the source list.

3. sudo apt-Get upgrade

Some urgently needed software

Routine document management software similar to OneNote in Windows

Mail management software similar to outlook

You can use the system's evolution or Thunderbird. There is no big difference between the two.

Software similar to blogging for live writer

The alternatives to these software have not yet been found. Just getting started with Ubuntu, there is still a feeling that there is no way to start writing.

Supplement:

1. I recently bought a ThinkPad E40 and installed javasntu 10.10 as the system. The notebook is mainly used for work. I found a problem at work, and the middle key on the keyboard cannot be used, in this way, the screen rolling operation is not convenient, and the little red hat will lose its role. In this case, I am not afraid of tossing. I searched the internet and found a solution.

First in the directory

Create the 20-thinkpad.conf file under/usr/share/X11/Xorg. conf. d/, edit the file, and add content

Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection

Save and exit.

Restart X Server and restart X server. Press CTRL + ALT + backspace. However, UBUNTU 10.10 has blocked this shortcut. You need to enable it.

System-> preferences-> keyboard, click the layout tab, click layout options in the lower left corner, find key sequence to kill the X server, and check contrl + ALT + backspace to explain: if you directly restart the system, it will enter tty1, instead of the graphic interface. There is no way to solve this problem.

  

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.