Android Studio Tutorial (ii): Basic setup and Operation _android

Source: Internet
Author: User

The above blog, introduced the advantages of Studio and 1.0 RC installation and hands-on experience, did not expect Google update speed so fast, has been out of RC 2 version, mainly to fix some bugs. So today we'll take a preview of the Stduio interface and basic functions.

Project structure

When we create a new directory structure for a project this is the default

You can see that there is a big difference between the directory structure of Eclipse and the studio window has only one project, and Eclipse can have a lot of projects at the same time, if you're not used to it, you can click on the top left corner to switch

Switch to the directory structure in project mode This is the way I'm used to this format.

The difference with eclipse is as follows:

1. Studio has the concept of project and module, as mentioned earlier in Studio a window can only have one project, that is, project, represents a workspace, but a project can contain multiple module, For example, the Android library, Java library, etc. that your project cites, can be seen as a module;

2, the above directory of Java code and resource files (Pictures, layout files, etc.) all boil down to SRC, in the SRC directory has a main group, while dividing the Java and res two folders, Java folder is equivalent to the SRC folder under Eclipse, The RES directory structure is the same.

Preference settings

After entering you may find that the font size or style does not conform to your habits, such as I think the code is too small to look hurt eyes, darcular theme default font is 12, I personally more accustomed to 14 of the font size. Never mind, go to Preferences (set) page search font to find the font option under colors&fonts , we can see the default font size is 12, However, you cannot modify it, you need to save it before you can modify it, click Save as to enter a name, such as mydarcular, and then you can modify the font size and font style.

Click OK and then go back to the page to find that the font is larger, but the studio default font size such as the sidebar does not change, looks very uncoordinated, the following figure

Obsessive-Compulsive disorder you certainly unbearable, OK, here also can set, to Preferences -> appearance modify as shown on the OK, here also not only can change the font size, you can choose a different font, Click OK, this page font is completely to your liking.

Adjust and then look at the effect

Run

Next Run the program, run it and compare it to Eclipse , click on the green arrow in the menu bar to run directly

The Studio default installation starts the simulator, and if you want to install it on the real machine, you can configure it. Select the Edit configurations selection prompt or USB device from the Drop-down menu.

Common functions

There are several common features on the right side of the studio menu bar, such as gradle synchronization ,AVD manager,SDK manager,DDMS

gradle Sync When you run your project or change your gradle configuration, click this button to download the dependent

AVD Manager Simulator Management

SDK Manager is managing your SDK version

DDMS is dalvik debug Monitor Service,dalvik Debugging monitoring service.

Creating the Emulator

It is recommended that you update the ToolsandExtras in the SDK manager Before you create the emulator.

Click the AVD Manager button

Click the Create button in the diagram

Select a device, here I choose Nexus 5, then next

Select a system version here, take 5.0 for example, and then next

Because your screen size is not the same, it is recommended here scale a column to select Auto, and then click Finish to see that we have created a 5.0 simulator.

This time we run again, select the simulator to start looking at the final effect (the simulator starts very slowly, everybody waits patiently)

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.