Android Studio usage Summary

Source: Internet
Author: User

Android Studio usage Summary
1. Build an Android Studio installation environment

 

Ii. Install the version control tool

After building Android Studio, we usually use version control tools to manage our code during development. Therefore, you need to configure a version control tool for Android Studio. Here is a blog post that describes the configuration process in detail,
 

3. Create a project

The process of creating a project is not detailed in detail. It is similar to eclipse. Unlike eclipse, Android Studio is a project window.
Create a project structure (this is not the case for some projects. Don't worry, just show the differences. Click "select project" in the red box to display the directory in the figure .)

It can be seen that the structure of Android Studio is quite different from that of eclipse.
Android Studio uses the project and Moudles structures.
A project is equivalent to a workspace in eclipse, while a Moudle is equivalent to a project in eclipse. Therefore, a project can contain multiple Moudle.

In addition, android studio uses Gradle to build a project. For reasons, see the following link:
Http://www.android-studio.org/index.php/docs/guide/

4. Import the jar package

Importing a jar package is very simple:

1. Add the jar package you want to add to libs

2. Right-click the jar package and click add as a library.

The following code is automatically added in the dependencies code of build. gradle: compile files ('libs/fastjson-1.1.28.jar ')
You can also manually add this code.

V. Reference third-party open-source frameworks 1. Add local open-source frameworks
Put the open-source framework in a directory at the same level as the APP ., Edit the setting. gradle file and add: ": open-source framework folder name ". For example, I placed librarytitle and materialDesign open-source framework folders under the app directory at the same level, and then edited setting. gradle. The content was changed:

Then return to the build. gradle file under your app directory and add it to the dependencies {} node:


In this way, you can reference your open-source library in the Code (in fact, this open-source library is a Moudle)

2. Add a remote open-source framework
You do not need to download the open-source framework, enter your project (generally the app directory), and edit the build. gradle file. Add the following content:


You can obtain this content in README. md of the open-source framework you are using. For example, the FlatUI open-source framework I am using, you can obtain the following content on its GitHub page:

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.