Learning Android development tools starting from 0-Explanation of Android studio

Source: Internet
Author: User
Tags custom name

Learning Android development tools starting from 0-Explanation of Android studio

Android studio details

We were the ancient saying that cloud: to do good deeds, we must first sharpen our tools.

1. Background of android studio

Android Studio is an Android Development Environment Based on IntelliJ IDEA. Similar to Eclipse ADT, Android Studio provides integrated Android development tools for development and debugging. The following describes the development history of android studio.

2013In May 16, 2013, at the I/O conference, Google launched the new Android development environment, Android Studio, and improved the developer console, adding five new features. Android Studio is a new Android Development Environment launched by Google. developers can view their applications on screens of different sizes while writing programs. Google has improved the developer console and added five new features, including optimization tips, application translation services, recommendation tracking, revenue curves, beta testing, and phased display. 1. Tips for optimization: Open your application in the main body and click tips. You will be advised to develop a tablet for your application. 2. Application Translation Service: allows developers to directly obtain professional translation from the development subject. Upload your request and select translation. The translation and price will be displayed and the translation will be sent back within one week. 3. recommendation tracking: allows developers to find the most effective advertisements. 4. revenue curve: shows the revenue of their applications to developers. 5. Trial tests and phased presentations by country: developers can test the application and release it to test users. The test results will not be published. When the test of a version ends, developers can release it to a specific proportion of users. Android Studio was released for the first time to facilitate Android-based development. The first problem solved is multi-resolution. Android devices have a large number of screens and resolutions of different sizes. Based on the new Studio, developers can easily adjust their applications on various resolution devices. At the same time, Studio also solves language problems, multi-language version ( But there is no Chinese Version)And support for translation make developers more adaptable to the global development environment. Studio also provides the Revenue record function. The biggest change is the Beta test function. Studio provides Beta Testing, which allows developers to conveniently perform test run. 2015Google released Android studio May 29, 2015 at Google I/O developer conference in 1.3, supporting C ++ editing and error checking. Android Studio 1.3 makes code development easier and faster, and supports C ++ editing and error checking. However, in July 2.0, android studio ushered in a 2.0 update. As we all know, upgrading android must be a major new version. The Breakthrough points are as follows: 1. Instant Run: Click to Run, users can immediately view the execution results of the new program code. This version of Instant Run is 50 times faster than before. The time spent after clicking Instant Run is enough for developers to go to the toilet.
2. GPU Profiler tool: allows users to record complete OpenGL sessions and check all changes in cells. You can also view each code and get the GL State and Commands messages.
3. Faster Android simulators.
4. Users can drag the APK file to the simulator and adjust the size by pulling the window.
5. Update the page and add a floating tool column.
6. It is said that using Android Studio 2.0 to develop applications for Android M is five times faster than before. In summary, we can see that the development speed of android studio is very fast, reflecting the high importance google attaches to android. In general, android was previously developed on Eclipse. However, Eclipse is a very wide development tool that can develop many things that java can do. However, the Android system does not have a Development tool. In the past 13 years, google has developed an Integrated Development Environment (IDE) specifically for android Development ). In just two years, AS (Android Studio) has developed very well and carefully, and versions have been iterated fast and become more and more stable and mature. Compared with the Eclipse ADT, Android Studio is like five tie Ren items in the track and field competition. It is very comprehensive. Android Studio is like a world record of one of them. Eclipse is incomparable in terms of professionalism. You can also see the download of Eclipse ADT on the homepage of the Android official website earlier. Now only Android Studio has been downloaded. It can be seen that google has completely abandoned Eclipse support. So now we can only use Android studio to develop Android applications. Next, I will teach you how to download and install and use Android Studio. 2. Download and install Android Studio: Because the android program is written in java, you need to build a java Development Environment before developing android. Click the link below to configure it. It is very simple: to build a java development environment, first enter the official website of android studio in the browser: development, which is the official website of android. Here we can click Develop in the upper left corner to enter the developer interface, as shown below: the android official website provides a tutorial. Here, you can click the API Guides in the upper left corner to go to a guides interface, as shown in Figure 2. According to the android Development Guide in column 2, you will learn how to develop android, but this requires your English skills. For android Developers, one of the essential skills is to be able to understand the API (Application Programming Interface, Application Programming Interface). Many Programming source files are written in English. Therefore, when developing android systems, you must get used to reading English documents. This not only improves your English skills, but also improves your work capabilities. Follow the instructions above to download the officially recommended stable version of android studio. Click the 2 button to display the download interface as follows: after selecting the agree clause, you can click the button above, and then download it. You can use it after the download is completed. If you think it is troublesome to go over the wall, I would like to recommend a very good domestic image Website: http://www.androiddevtools.cn/this website has the latest android studio download. We recommend you download the last 2nd versions of android studio, we recommend that you download the 2.0 Preview3 version, because the new version may have some minor issues. However, the previous version has also been tested by the market, so it should be stable. We recommend that you add this website to your favorites. There will be a lot of latest android tools and solutions available here. There are also a lot of gadgets under this website, which you will certainly need. Click this link to view the installation of Android studio. The installation of android studio is not described here, because android studio has been installed on my computer, therefore, you can install it according to the methods above Baidu. 3. the flowchart for creating a new project using android studio for the first time is as follows: android studio has made many templates for us, such as Navigation Drawer Acticity, but these templates are rarely used, generally, select Black activity or Empty Activity. Next, click Next to complete project creation. First, the directory structure that android presents to us is as shown in the red box, which is the default directory structure of Android, however, the directory structure is different from the file storage structure. The file storage structure is the project directory structure. However, the android system designed the Android Development Directory structure to facilitate our development. For example, you can click the drop-down button next to Android to display different file structures to facilitate developers' Personal Development habits and engineering needs. The advantages and disadvantages of various directory structures will be discussed later. The directory structure of the View File is the same as that of the project in android studio, as shown in the following two figures: the above describes how android studio creates a project, and the file directory structure in the project. The following describes some important configurations of Android development: 1. To develop android, you must first download the android SDK, which is the software development kit (abbreviation of foreign language: SDKFull name of a foreign language: SOftwareDEvelopmentKIt)Generally, it is a collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, and operating systems. With these sdks, We can compile and present our code. For example, follow the steps 1 and 2 to open the SDK manager. This is very important. In the future, you will manage the SDK. First, you must install the Android SDK Tools, Platform-Tools, Build-tools, and Build-tools under tools to install the latest two or three, I should have been using many versions since the very early version. We recommend that you install SDK platform and Samples for SDK in the following Android APIs to download the virtual machine image file of android 4.4.2 To create an android virtual machine. We recommend that you download a version of 4.4, a version of 5.0.1, which can be connected to a virtual machine image file. Download extras additional resources. We recommend that you download the selected resources, especially the last Intel virtual machine acceleration plug-in. After downloading, you need to install it under the folder, it is useless to download and not install it. After selecting the file you want to download, click the installation package in the lower-right corner. For example, check accept permission and wait for the download. After the download is complete, a red check mark will appear in front of the successfully installed package in SDKmanager, for example, 2. after downloading the SDK and some important file packages, you can open your simulator and manage it. It provides an android Virtual Machine for android, as shown in the following flowchart: through the above flowchart, an android virtual machine is created for android development to demonstrate its performance. I used studio2.0 to optimize the virtual machine. after the virtual machine is enabled, you can manage the Virtual Machine. Click the Android Device Monitor Device manager next to SDK manager. You can view the File manager of the Device through the following Device manager, as shown in: this file manager will be used in many projects in the future. Especially for data storage, you need to check whether the database and file storage are successful. It is a simulator setting that can simulate functions such as making phone calls and sending text messages. 4. Click the Settings button below to set some common attributes of android studio. Here is the topic for setting studio. The first is the classic topic of android studio, as shown in the following figure. Darcula is the black topic I am using and the most popular topic. We recommend that you use this topic. It will not be eye fatigue after a long time. It is very good. You can set the code size in step 1. As shown in: The following shows how to check the SDK upgrade options. We recommend that you check the options. You can change the SDK path. By setting shortcut keys for android studio, many developers come from java and used eclipse to develop software. Naturally, they are familiar with Eclipse, then you can change the Eclipse shortcut that we are familiar with through step 1, as shown in. The most important thing is that android studio changes the eclipse Alt +/to Alt + Enter. This is very important. The Alt + Enter feature is much more powerful. You can use it later. If you select the one in the middle, you can dynamically change the size of the Code with the mouse and scroll wheel. Select the automatic loading items in step 1 and select import on paste as ALL. Then you do not need to manually add the library in the code. Android studio is automatically added to facilitate development. The following describes how to set the code size and the style type. However, to save as is to save it as another custom name. In this example, It is My, the following is to set the encoding format of the project, now the server encoding is UTF-8, so here set to UTF-8, here to see the needs of personal projects. But the big environment is using UTF-8, so it is recommended to use UTF-8 here. Summary: Through the above hand-held download and configure android studio. Now that the knife has been worn out, it is time to cut back the firewood. We believe that we will use android studio to develop outstanding android software.

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.