Although there are no new Android systems and devices at this year's Google Global Developer Conference, some good products have been launched. Android studio is one of them. This intellij idea-based Android ide allows many people to see it. Its real-time layout file preparation and real-time preview and multi-screen adaptation can be said to give hope to those who suffer from interface layout development. The Automatic code prompt and running response speed are better than those of Eclipse. However, the version released this time is a preview version, so there is still a lot of improved controls, so we do not have to worry about poor or difficult to use, there is space to make progress. Google also sets the version number to 0.1 rather than 1.0. We can see that it has a huge space for improvement. We can try it first and wait for the continuous release of the improved version. Today, let's record the android
The use of maxcompute studio and some of my feelings over the past two days, I first declared that I tried it on Mac. I heard that Windows is slow and memory consumption is high, it should be good to use it on Linux and Mac.
1. Download and install
Go to http://developer.android.com/sdk/installing/studio.htmlto download the installation package (DMG file), open and drag Android studio to applications. After copying the package, you can drag the icon under the application to the dock.
2. Create a project
After the installation is complete, select the default option and click OK:
Go to Android studio. The start interface is a bit similar to xcode. Click new project to create a project. The process of creating a project is similar to that on Eclipse. I will not go into details here. Yesstart interface:
After the project is created, the main interface of Android studio is displayed. There may be nothing as shown in the first entry. Click the arrow to expand the directory structure,
After expansion, we can see the directory structure of Android studio, which is a little different from the Eclipse project:
Differences:
1. the directory structure of Android studio originally represents a workspace. a workspace can contain a module, which can be understood as a project in eclipse;
2. in the directory, Java code and resource files (images, layout files, and so on) are all attributed to SRC. There is a main group under the src directory, and the Java and res groups are divided at the same time, res and eclipse have the same structure. Java is the source code package and class file;
3. different file creation methods. Right-click "new" or "command + N", and a new menu is displayed. The type of menu includes Java class, that is, general Java class. file is a common file, and package is the package creation, it is worth noting that android component directly provides the creation of basic components in Android.
You can choose to create different types of Components in Android:
3. window layout and topic Introduction
In addition, there is a tab named android at the bottom of the main interface. You can view the device information and logcat output in ddms:
On the top toolbar, you can see an option with the same functions as in eclipse. I believe everyone is familiar with it:
It should be noted that, as you can see, my main interface is in a dark color style, which is the same as that demonstrated by Google. For the first time, you can use the default style (highlighted ), if you want to modify it, go to preferences (by command +,) to ide settings, select colors & font, and set schema name to darcula. You can set it to a dark color style. If you need to define your own style, for example, you can create a new schema to define the font size and color.
4. layout file writing (Real-Time Preview)
The most dazzling feature is coming. You can write and preview layout files in real time. This feature greatly improves development efficiency. Open an XML layout file and click the preview tab on the right to open the preview interface, you can choose a mobile phone of multiple sizes for preview:
At the same time, you can preview a variety of devices of different models and sizes at the same time, write code and adapt to a variety of models at the same time, this is what you dreamed!
Now, let's write this article. It's too difficult to edit the csdn blog and Image Upload, especially for uploading images, you can learn how to adjust the size after uploading the QQ mailbox. The page captures images and transmits them to take up most of the screen. After so many years, it's time to upgrade the screen to make it easy for people to write blogs. In addition, on the Internet these two days, many people complained about the unpleasant effects of Android studio. In fact, this is not the case. After all, it is a preview version. As mentioned above, there is room for improvement, in the future, Android Developers will inevitably migrate from eclipse to Android
Studio came up, so we are still optimistic about learning and accepting, good things need time to hone and baptism.
This is my opinion and is for reference only!
The next article introduces how to import the Eclipse project to Android Studio and the differences between the two and common shortcut keys!
Android studio tutorial (2)
To join our QQ group or public account, see: Ryan's
Zone public account and QQ Group
At the same time, you are welcome to follow my Sina Weibo chat with me: @ Tang Ren _ Ryan