Use Android Studio to build an Android integrated development environment (Graphic tutorial) and androidstudio

Source: Internet
Author: User

Use Android Studio to build an Android integrated development environment (Graphic tutorial) and androidstudio

[Statement] 

Reprinted, but keep the original source of the article → _ →

Life One: http://www.cnblogs.com/smyhvae/

Source: http://www.cnblogs.com/smyhvae/p/4022844.html

Contact: smyhvae@163.com

 

[Body]

Previously, I mentioned in my blog how to use IntelliJ IDEA 13 to build an Android integrated development environment (Graphic tutorial ). The system was reinstalled yesterday, so to keep up with the times, let's try Android Studio today. I have read several blogs about how to use the Android SDK to build an integrated Android development environment,Therefore, I plan to organize a detailed graphic tutorial by myself, hoping to help new users (including myself )..

[Development Environment]

Physical server version: Win 7 flagship edition (64-bit)

Java SDK version: jdk1.8.0 _ 20 (64-bit)

Android SDK version: Android 4.4 (API 20)

Android Studio version: Android Studio Beta v0.8.6

Note: The physical server version and Java SDK version must be the same, that is, both 64-bit and 32-bit.

I. Introduction of Android Studio:

Android Studio IDE (integrated development environment for Android platform) was first released at the 2013 GoogleI/O conference ). It is based on the Intellij IDEA development environment and aims to replace Eclipse and ADT (Android Developer Tools) to provide developers with better development tools. Since Google has been promoting it, I believe it is expected to catch up with Eclipse soon.

  • Compared with Eclipse, Android Studio IDE has its own features:
  • Provides better support for UI design and code writing, allowing you to easily adjust various resolutions on the device.
  • The ProGuard tool and application signature are also supported.
  • However, currently, Android Studio cannot manage multiple projects in the same window. Each project opens a new window. I guess this is a reference to Intellij IDEA and Google will not make any adjustments in the near future.
  • It is really good to support the Gradle automated build tool, but it still takes some time for developers who just transferred from the Eclipse platform to learn and adapt.

 

2. Software preparation:

Since Android is to be developed, No matter what development environment is used, Java SDK and Android SDK are essential (Android SDK has been integrated in Android Studio ). After the download, my software package is as follows:

1. Java SDK installation:

Download Site: http://www.oracle.com/index.html

Because my operating system is 64-bit, I download the 64-bit JDK version:

After the download, start the installation:

Select the installation path based on your preferences.

You need to configure the environment variables later. For details, refer to another blog: Java configuration-JDK Development Environment establishment and environment variable configuration.

2. Download and install Android Studio:

Download Site: http://developer.android.com/index.html

Click the text in the red box above to go to another link:

Click the red box to bring up the following interface:

Click the red box to start downloading:

After the download is complete, you can start the installation:

, Select the appropriate installation path, and then continue:

After the software is installed, the Android SDK will automatically appear in the installation directory:

 

3. Start running the software:

Note: After JDK is installed and environment variables are correctly configured, the JDK is automatically loaded once Android Studio is run (the premise is that the environment variables are correctly configured ), the Android SDK is also available. Run the software now.

After Android Studio is installed, run the software. The following dialog box is displayed when the software is run for the first time:

Is to remind you whether there is a previous version of the Android Studio setting file. This file is an xml file generated by users who have used Android Studio before, after the import, you can directly use the previous development habits. For new users, You need to select I don't.

Then, click Create New Project to Create a New Project:

Note:The Project in Android Studio is not a real project. It is actually a concept with the workspace in eclipse and solution in visual studio..

Let's take a look at the following table to see:

  Eclipse IEDA/Android Studio
Work Zone Workspace Project
Project Project Module
Reference Preference Module dependency

The following page is displayed:

:

Select the minimum API version ). Then proceed:

Select a template style. Then proceed:

After the project is created, the software automatically downloads gradle-related components, which takes a long time (because it is the first time to load ):

Wait a moment to see the project we have built:

, Pay attention to carefully look at the directory structure of the project file, as well as the loaded Library (including Android SDK and Java SDK ).

Click "File Project Structure" in the menu bar and check the previously loaded SDK:

Well, the Java SDK and Android SDK are all loaded, Which is the result we want. Click the "Project" tab to view the gradle version:

 

4. Install Genymotion simulator:

1. Install Genymotion:

Genymotion is undoubtedly the fastest and best simulator. Official Website: http://www.genymotion.cn/

First register and then download. The simplest way to install VirtualBox is to download the Genymotion package containing VirtualBox, as shown in:

After the download is complete, start the installation. Run the Genymotion software and you will be prompted to create a virtual device. Click "yes" to create a virtual device:

Use the previously registered account for connection:

Then select one of the simulators:

In this way, our simulator is ready. Next we need to associate the simulator with Android Studio.

2. Associate the simulator Genymotion with Android Studio:

First download the plug-in from Genymotion's official website:

Open Android Studio and select "File --- settings" in the menu bar. The following interface is displayed and Plugins is selected:

Select "Install plugin from disk" and load the plug-in locally. The following page is displayed:

, Select the plug-in we downloaded before loading. In this way, we can see more Genymotion plug-ins in the plug-in list:

Restart the software to make the new plug-in take effect. After restarting the software Android Studio, select "View -- Toolbar" on the menu bar to display the Toolbar. You can see that Genymotion Device Manager is added to the Toolbar:

Click this icon to bring up the following interface:

Load the previously installed Genymotion folder. Then click the icon to bring up the following interface:

, We can see that we have started the simulator:

Success.

Of course, if you want to run the program on the simulator, make sure that the simulator has loaded the Android SDK:

Then, run the program on the simulator:

In, we can see that the version I compiled is API 20, but the Simulator version is API 16, but the program can still run, indicating that Android Studio is doing well in terms of version compatibility. However, when IntelliJ IDEA is used, the compiled version must be consistent with that of the simulator.

 

5. Simple settings of Android Studio:

Topic modification:

You may think that the software interface is not very nice. We can change the topic. Select "File -- settings -- apperance -- theme" on the menu bar, and select Darcula as the topic:

Code font modification:

Select "File -- settings -- Editor -- Colors & Fonts -- Font" in the menu bar ":

The default Scheme cannot be changed. Click Save As to create a new name (for example, MyFont ):

You can select the font you want.

You can also modify the font of the console:

More tips on using Android Studio will be discussed in the future.

 


Android integrated development environment?

Don't want to learn JAVA? It's a little difficult.
It is easy to set up the environment. Install the latest version of eclipse on both windows and linux platforms and download an android-sdk for windows/android-sdk for linux.

How to build an Android development environment using eclipse

First download an android sdk, and then install the simulators of various android versions online. It takes a lot of time. I remember that I spent a whole night (my network speed is slow). After the installation, I can create a simulator. Of course, this can only be an independent running simulator that has not been integrated into the IDE.

Secondly, download ADT (Android Development Tools) PLUG-IN. The adt plug-IN can be integrated into Eclipse or MyEclipse. you can install it online or independently download ADT, then integrated into the IDE. In this way, you can use MyEclipse to develop android applications.

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.