Android Studio using tutorial (i)

Source: Internet
Author: User

This year's Google Global Developers Conference, although there are no new Android systems and devices, but also launched some good products, Android Studio is one of them. This Android IDE, based on IntelliJ idea, makes a lot of people light up, in fact, writing layout files in real-time preview and adapt to the multi-screen function can be said to be suffering from the interface layout development people see hope. The code automatically prompts, runs faster, and is better than eclipse. But this release is a preview version after all, so the improvement of the control is very large, we also do not spit groove bad or difficult to use, there is room, so there is progress. Google also set the version number to 0.1 instead of 1.0, it can be seen that the improvement of space, we could try, waiting for the perfect version of the continuous launch. Today to record the use of Android studio and the two days I use some of the feelings, first declare that I tried on the Mac, I heard that in Windows lag and memory consumption is large, on Linux and Mac use should be good.

First, download the installation

To http://developer.android.com/sdk/installing/studio.html Download the installation package (DMG file), open and drag Android studio to applications, copy it , you can drag the icon to the dock under the application.

Second, the new project

When the installation is complete, select the default option and click OK:

Go to Android Studio, start the interface and Xcode a bit similar, click New Project to create a project, the new process and the same as in eclipse, here will not repeat. Is the start interface:

The new project was completed and entered the Android studio main interface. The first time you go in there may be nothing as shown, click the arrow button to expand the directory structure,

When you expand, you can see the directory structure of Android studio, and the project for Eclipse is a little different:

Difference:

The directory structure of the 1.Android studio represents a workspace, and a workspace can have a module that can be used to interpret a module as a project in eclipse;

2. The directory will be Java code and resource files (Pictures, layout files, etc.) all boil down to SRC, in the SRC directory there is a main group, while the Java and res two group,res and the structure under Eclipse, Java is the source of the package and class files;

3. New file mode, the right button to choose New or Command+n after the new menu, type has Java class, that is, the general Java class, file is ordinary files, package is built, it is worth noting that the Android Component, It directly provides the creation of basic components in Android.

You can choose to create different types of components in Android:

Three, window layout and theme Introduction

Also, at the bottom of the main interface is a tab called Android that opens to see the device information and logcat output in DDMS:

In the top toolbar you can see the same options as the features in Eclipse, which are all familiar to you:

The last thing to note is that you see my main interface is dark color style, and Google demo is the same style, everyone first use Open is the default style (bright), if you want to change, enter preferences (press command+,) to the IDE Settings Select Colors&font and set the schema name to Darcula can be set to dark color style, if you need to define the style, such as font size color, you can create a schema to define their own

Iv. Layout file Authoring (real-time preview)

The most dazzling features to come, write and preview the layout file in real time, this function really greatly improve the development efficiency, open an XML layout file click on the right preview tab to call out the previewing interface, you can choose a lot of size of the phone to preview:

At the same time, can also preview a variety of different models and sizes of equipment, writing code at the same time to adapt to a variety of models, this is not the original dream!

Ok this one write to this, Spit Groove, csdn blog editor and image upload editor is too difficult to use, especially the picture upload, all kinds of uncomfortable, you can learn under the QQ mailbox after uploading the size bar, the interface cut a picture to occupy the majority of the screen, so many years, the upgrade under, let write Bo human how to AH. In addition, these two days on the internet to see a lot of people complaining about the various uncomfortable Android studio, in fact, we do not need to do so, after all, is a preview version, said before, there is room for progress, Android developers will inevitably slowly migrate from eclipse to Android Studio come up, so we are still holding an optimistic attitude to learn and accept it, good things need time to hone and baptism.

Purely personal point of view, for reference only!

The next article introduces the introduction of the Eclipse project into Android Studio and the differences between the two and the common shortcut key descriptions!

Using the Android Studio Tutorial (ii)

To join our QQ group or public account please see: Ryan's Zone public account and QQ Group

Also welcome to follow my Sina Weibo and I exchange: @ Tang Yu _ryan

Original address:

http://blog.csdn.net/tangren03/article/details/8941364

Android Studio using tutorial (i)

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.