Instructions for using Android Studio

Source: Internet
Author: User

Instructions for using Android Studio

Article: http://download.csdn.net/detail/li396858359/5611743

Android Studio. Google launched an Android app development software on the I/O conference on May 15, which is a great way to use it instead of Eclipse+adt. The following combination of my use & understanding to introduce a simple use, through this description general application is can smooth transition to the use of Android studio developed. Description Package A few parts, installation, home introduction, some configuration item description, project creation, Project import, Lib Library management, library project import.

Installation

Software: http://developer.android.com/sdk/installing/studio.html. and detailed installation instructions at the address, the core meaning is to have a Java environment, and configured correctly. This step is uncertain the classmate Baidu &google.

Home Introduction

On the left is the list of recent projects, and Android Studio uses the project + module mode, and the basic one project is a workspace. So there will be more than n list items on the left.

New project, this function basically in time a waste bar. The reason is that the project structure is different from eclipse, but I can't escape some of the limitations of Eclipse.

Import projects to import projects created by Eclipse directly into Android studio.

Open the project, there's nothing to say.

This is a powerful feature for check items from the repository. Code creation Works can be directly obtained directly from the Svn,git library.

Configuration, configuration items for the IDE.

Partial Configuration Item Description Click Configure--Settings

1. Theme & Remove garbled settings

2. Encode font settings, saying the default font nausea is not a little bit.

3. File Header Comment Modification & shortcut key modification

Click Configure--Project Defaults--Project Structure

1. New Project Default environment configuration

2. Add the SDK Environment

3. Library & Global Library

Click Configure--Project Defaults--Run configurations

Project creation

Because the project directory structure created through Android Studio is different from eclipse, it may be available for new project development or personal development. For old project maintenance and people in the team who are still using Eclipse, this feature is out of the picture.

In the following sentence, say this function. Create a project to fill in the information, all the way next.

Project Import

Project import, more accurately import projects from Eclipse. The official provides an import method, but there are some problems with the experiment, ADT needs to be upgraded, and the corresponding SDK also needs to be upgraded. After the upgrade has introduced a third-party project all error, the reason is a bit tangled on the lazy to write.

Let's start by introducing the project import issue, according to the official advice is to upgrade ADT to the latest version, and then generate a Build.gradle file in the Eclipse project, which is used for the new build system. However, it is also noted that it is not possible to generate build.gradle files. Given the familiarity with the new build system, use my ant well.

Formally enter the project import phase

1. Open the Android Studio launch page, select Import project, select directory structure to the project to import. The results are as follows.

2. Select OK to proceed to the next step. The results are as follows.

3. Next, as a result. Changes are not recommended here about the project name and project path. This can be used with eclipse at the same time, and I test several times, changed the name of the project can not be imported.

4. The following steps are some confirmation of the source code path, confirm the import jar, confirm the project module, etc., the basic can be unlimited next, the final completion of Android Studio will automatically open the imported project. The general project is done by importing into this. Here's an introduction to some of the slightly more complex items.

5. Import the project from the Code folder checked out from SVN, and in the final step ask if you want to add a *.IML file to SVN and manage it, this is a personal wish and company policy. *.IML file is a configuration file some companies may require that unrelated files be imported into SVN. This file does not affect the development of the project, so you can take a casual attitude.

6. Import the project directly from the SVN repository instead of the 5th one to import the project from the checked-out code.

6.1 Launch the Android studio to launch page, click Check out from Version Control--Checkout from--Subversion. The results are as follows:

6.2 Add an SVN repository, select to the project directory, click Checkout. SVN involves the company SVN address, inconvenient to write, this step can be operated on its own. After clicking the results are as follows:

6.3 Select a directory, then the results are as follows:

6.4 below choose which SVN version to use for formatting, 1.7. Start the code download below. A bullet box selects Yes, and the following is the beginning of the code import work as step 5th. This completes the project from SVN import.

LIB Library management

Android Studio is derived from idea, and Lib Library management differs from Eclipse's development of Android, and the jar packages copied to Libs are not automatically introduced into the project and used. It needs to be added to the project manually. There are generally two ways of

Right-click Import

1. Right-libs The following jar package, in the following options, there is an add as Library.

2. Click on the box as follows:

3. Select Classes,ok and the results are as follows:

You can customize the name, the level at which this jar package exists (global, project, module), and use it in that module. Ok,jar Package Import Succeeded

Import at Project configuration page

1. Click on the red circle to enter the project configuration page.

2. Go to the page below, where you can change some of the configuration of the project

Add a third-party jar package to the project, and work here

Library Project Import

In the development of the library model is often used in the project, this situation in the Android studio how to do it. Can generally be divided into two steps.

1. The library project is first imported into Android studio, and there is no difference between importing and general project import.

2. Open the main project configuration page

In the third place, click the plus sign to select the third item to import library libraries.

Instructions for using Android Studio

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.