Chapter 1 andriod studio installation and environment setup

Source: Internet
Author: User

Chapter 1
Andriod studio installation and environment setup

 

1. Introduction to Android Studio

Android studio is a new Android Application Development Environment released by Google, and Android studio is based on intellij
Developed by idea. In the android Studio development environment, Android Developers can easily debug Android applications. Android studio is not only an IDE integrated environment developed by Android, but also has the following features:

• Based on gradle
Build support

• Android
Dedicated refactoring and quick restoration

• Tip tools to capture performance, availability, version compatibility, and other issues

• Support for proguard
And Application Signature

• Template-based Wizard to generate common android application designs and components

• The powerful layout editor allows you to drag the UI control and preview the effect.

 

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 ads.

4. revenue curve: shows developers the revenue of their applications, which is divided by country

5. Trial Test and phased display: developers can test the application and then release it to the test user. 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. multilingual versions and support for translation allow developers to better adapt to the global development environment. Studio also provides the Revenue record function. The biggest change is the beta test function. Studio provides Beta
Testing allows developers to conveniently perform test run.

 

2. Download Android Studio

Official Website address of Android studio:

Http://developer.android.com/sdk/installing/studio.html

 

Unix/Linux: android-studio-bundle-130.677228-linux.tgz

Http://pan.baidu.com/share/link? Consumer id = 566016 & UK = 487907638

 

Mac OSX: android-studio-bundle-130.677228-mac.dmg

Http://pan.baidu.com/share/link? Consumer id = 566017 & UK = 487907638

 

Windows: android-studio-bundle-130.677228-windows.exe

Http://pan.baidu.com/share/link? Consumer id = 566018 & UK = 487907638

 

3. Install Android Studio

A. Pre-installation settings

1. Install JDK

:

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Note that you must select a version suitable for your system.

2. Configure Java environment variables

Control Panel → system → advanced system settings → "environment variables" under "advanced ":

  • Click Create in system variables, enter java_home in the variable name, set the variable value to the JDK installation path, and enter "C: \ Program Files \ Java \ jdk1.7.0 _ 21" here.
  • In the system variables, click Create variable name and enter classpath. Fill in the variable value with ".; % java_home % \ Lib \ tools. Jar ". Do not forget the front and middle semicolons.
  • Find the PATH variable in the system variable, which is built-in to the system and does not need to be created. Double-click path. Because the original variable value already exists, add "; C: \ Program Files \ Java \ jdk1.7.0 _ 21 \ bin" to the existing variable
B. Install Android Studio

Download the android studio installation file at http://developer.android.com/sdk/installing/studio.html#download. after downloading the file, click Next.

If your system is not a win64-bit system, but a 32-bit system, refer to the following solutions:

All Android studio fails to run due to an error in execution of studio. bat. The last is the same job:

Answer the 32-bit win7 system question.

Find studio. bat under bin in the installation directory, and use Edit to open studio. bat, lines 25th to 28:

SET JRE=%JDK%
IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
SET BITS=
IF EXIST "%JRE%\lib\amd64" SET BITS=64

We can see that the number of system bits supported by the software is 64 bits, and my own computer is a 32-bit JRE/lib directory with only i386 files.

IF EXIST "%JRE%\lib\amd64" SET BITS=64

Change

IF EXIST "%JRE%\lib\i386" SET BITS=32

For 32-bit XP systems:

Set bits = changed to set bits = 32

64-bit system unchanged

Installation:

1-1-1

Click Next, as shown below:

1-1-2

It must be JDK. When I first install JRE, it is automatically filled with JRE, and cannot be used. So I reinstall it later and continue to next:

1-1-3

Next:

1-1-4

Select install to start installation, and click Finish. (Note: After installation, if your system is not 64-bit, do not start Android studio. At this time, you can run the software after setting studio. bat)

Run the program. The following page is displayed:

 

 

1-1-5

When you run the program for the first time, the following error occurs:

1-1-6

After a period of time, the following occurs:

 

1-1-7

Installed successfully!

 

Iv. Installation Problems

 

1. Android StudioAn error occurred while creating a new project. cocould not fetch model of Type 'ideaproobject' using gradle Distribution

Problem:

Failed to import new gradle project: cocould not fetch model of Type 'ideaproject 'using gradle distribution 'HTTP: // services.gradle.org/distributions/gradle-1.6-bin.zip '.

Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.

For example, an unrecognized JVM option is used.

Please refer to the User Guide chapter on the daemon at http://gradle.org/docs/1.6/userguide/gradle_daemon.html

Please read below process output to find out more:

-----------------------

Error occurred during initialization of VM

Cocould not reserve enough space for object heap

Cocould not create the Java Virtual Machine.

Consult ide log for more details (help | show log)

Environment:

Win7

 

Solution:

1
Go to the C: \ Users \ <username> \. gradle directory.

2
Create the gradle. properties file.

Content: org. gradle. jvmargs =-xmx512m

3
Restart your android studio project.

 

Next chapter

Chapter 2 setting up the andrid visdio Environment

Introduction: in the previous chapter, we mainly explained the download and installation of andrid visdio. This chapter describes how to build an andrid visdio environment and create a project, implement a simple "Hello world ",

This section also describes some common problems and solutions during project creation.

 

Author:

QQ: 1933267397

: Szjob

 

Copyright violations

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.