Build the Android development environment under Ubuntu _android

Source: Internet
Author: User

1. Install JDK

Actually this step I am more lazy, looking at the Internet to install the JDK under the Ubuntu system, it looks a little bit cumbersome, so I tried to take a look at the software center, and then found in the software in the heart of a openjdk Java 7, try to install, found that this is a good thing, After the installation of one-click Environment variables have been automatically equipped with, Eclipse and anything can be automatically recognized, very convenient. Baidu is the difference between open jdk and Sun jdk, probably the Sun's JDK is developed on the basis of open JDK, extending something. After the use of this time, in the development of Android did not find any difference, very good use ~ so we recommend directly in the Software Center installation openjdk.

2, download Adtbundle

It's easy to install Android development tools on whatever system you're on, because you can find development tools that fit the three operating systems (Windows, MAC, Linux) on the Android web, whether it's integrating eclipse, Android The SDK and ADT's Adtbundle, or Google's dedicated Android Studio, can find a suitable download for its operating system, which is very handy. The only inconvenient is now because of Google by the great gfw outside, resulting in the Android website can not be normal access, so ... Go over the wall. If it's inconvenient to flip over the wall in Ubuntu, you can download Windows now and then copy it. As for the choice of Android studio or Adtbundle, I suggest the latter. I've tried installing Android Studio, but I couldn't open it, and then I gave it up, and it's really not perfect in many ways, so let's just be honest with eclipse.

Go to the Android website, find developer below, and download Adtbundle to any folder in tools. Unzip the downloaded zip file, which will have two folders, Eclipse and SDK, respectively to install what I guess I don't need to say more.

3. Update SDK

Although the adtbundle that have just been downloaded are integrated with the SDK, they are often less complete, such as the latest version containing only the Android 4.4W (the development package specifically for the Android Wear), and if you need an Android L or a previous version of the development Kit, you need to pass the SDK Manager

Open Eclipse, Open SDK Manager from the shortcut bar above eclipse, and you will find it impossible to get any version of the SDK package, or because of the GFW, there is no way to do anything else. If you buy a VPN yourself, you can click Tools-options in the SDK Manager window taskbar, then fill in the IP and port of your VPN, and then restart the SDK manager, and you will find that all SDK packages are loaded and you need to download the packages you want.

Of course, if you're as poor as I can afford a VPN, there is a simple way to change the hosts.

Open the terminal and enter:

sudo gedit/etc/hosts

Then add the following two lines to the back

203.208.46.146 dl-ssl.google.com

203.208.46.146 dl.google.com

This is the latest IP address, loading fast, download the SDK can basically achieve their bandwidth speed. After adding good, save exit. Reboot SDK Manager, also found that the SDK can be loaded and downloaded, select the package you need to download.

4. Install Genymotion Simulator

Although ADT's own AVD can simulate Android devices to debug test-developed Android apps, the people who use them know that it's just too hard to tolerate as a compulsive disorder. Although the Android emulator has been accelerated by using Intel x86 mirroring under Windows, the Linux system is not yet supported and the acceleration effect is not as good as expected. And I recommend today the Genymotion simulator, quite smooth, almost comparable to the speed of the real machine, whether the boot or loading program is quite smooth.

Enter the Genymotion official website, click to download, enter your mailbox, in the mailbox through the verification into the download page. (Note that after the successful mailbox verification message should not be deleted, there will be your user name username, then to use) in the download page do not rush to download genymotion, before that need to install Oracle VirtualBox, download down is a deb bag, Double-click the installation directly. After installation, download genymotion, download is a. bin file that needs to be installed through the command line:

Open the terminal and use the CD command to enter the directory where the bin file was just stored, and then enter the following command:

chmod a+x filename

sudo./filename

Note that there is a point before the second sentence executes the command.

Then enter the installation program, installed well.

After installation in the installation directory to find Genymotion, open, will automatically prompt you to add equipment, yes, click the Connect button below, enter the username and password (the user name is the previous mail that) landing, and then free to add Android virtual devices, Add good play Run simulator, feel the flow of the simulator! The development of the future when you do not have to envy the iOS developers have a great simulator

OK, now that your Android development environment has been set up, create a new Android project and start Hello World.

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.