Android Studio tutorial 2-Basic settings and running

Source: Internet
Author: User

Android Studio tutorial 2-Basic settings and running

In the previous blog, I introduced the advantages of maxcompute Studio and the installation and getting started experience of 1.0 RC. I didn't expect google to update so quickly that RC 2 has been released, mainly to fix some bugs. Today, we will take you to preview the Stduio interface and basic functions.

Project Structure

The default directory structure of a new project is as follows:

Vce9 + NDQx9C7uzwvcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20150126/20150126083845132.png" alt = "\">

Switch to the directory structure in "project" mode. I personally prefer this format.

The differences with Eclipse are as follows:

1. maxcompute Studio has the concept of Project and Module. As mentioned above, a window in maxcompute Studio can only have one Project, that is, a Project, representing a workspace. However, a Project can contain multiple modules, for example, the Android Library and Java Library referenced by your project can be regarded as a Module;

2. In the preceding directory, java code and resource files (images, layout files, etc.) are all attributed to src, and there is a main group under the src directory, the java and res folders are divided at the same time. The java folder is equivalent to the src folder under Eclipse, and the res directory structure is the same.

Preference settings

After entering, you may find that the font size or style does not meet your habits. For example, I think the code is too small to seem eye-catching, and the default font of the Darcular topic is 12, I personally prefer the font size of 14. It doesn't matter,Preferences(SET) page searchFontFindColors & FontsUnderFontYou can see that the default font size is 12, but it cannot be modified. You need to save it before modification. ClickSaveEnter a name, suchMyDarcularAnd then you can modify the font size and style.

Click "OK" and return to the page to find that the font size is increased. However, the default font size of maxcompute Studio, such as the sidebar, does not change and looks very uncoordinated, as shown in figure

You cannot tolerate obsessive-compulsive disorder. It doesn't matter. You can also set it here.Preferences->AppearanceClick OK to change the font size. You can also select different fonts and click OK. This time, the font of the page is quite appetizing.

After adjustment, check the effect again.

Run

Next, run the program, runEclipseClick the green arrow in the menu bar to directly run

StudioThe default installation will start the simulator. If you want to install it on a real machine, configure it. SelectEdit ConfigurationsSelect the prompt or USB device.

Common functions

There are several common functions on the right of the Studio menu bar, which areGradle Synchronization,AVD Manager,SDK Manager,DDMS

Gradle SynchronizationClick this button when you run your project or change the Gradle configuration to download the corresponding dependency.

AVD ManagerSimulator Management

SDK ManagerIs to manage your SDK version

DDMSThat is, Dalvik Debug Monitor Service and Dalvik Debug Monitoring Service.

Create a simulator

We recommend that youSDK ManagerInTools,ExtrasAre updated to the latest version.

ClickAVD ManagerButton

Click create in the figure.

Select a device. Here I select Nexus 5 and Next

Select a system version. Here, we use 5.0 as an example, and Next

Since the screen sizes are different, we recommend that you select Auto in the Scale column, click Finish, and we can see that we have created a 5.0 simulator.

Run again this time. Select the simulator to start and check the final effect (the simulator starts slowly, so you can wait patiently)

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.