Android Studio installation, configuration and first program demo

Source: Internet
Author: User

Objective

Android Studio is a Google-launched Android integrated development tool based on IntelliJ idea, similar to eclipse ADT. After the official launch, the continuous maintenance update, the Android studio has become increasingly sophisticated, its powerful features and friendly interactive performance makes it popular with developers, and gradually become the main tool for Android development.

Installation introduction 1. Download the installation package

Download the latest version of the installer directly on the official website: https://developer.android.com/studio/

2. Installation

Open the installation package for installation, the general default option is

In the second step be careful to check the installation of virtual devices

Then click Install to wait for the installation to complete.

3. Configuring the SDK

After installation, open Android Studio, the first time you run the error message, the Android SDK is not set, click Cancel (option Setup proxy will pop up the HTTP Proxy configuration window, you can do without it, the default no proxy)

The Missing SDK window appears, followed by the prompt next, the same default option can be

Then wait for it to download the installation (this process may take a long time and wait patiently)

After installation can go to the main interface, click on the bottom right corner of Configure>sdk Manager, then in the SDK platforms can see the SDK version of the list, you can download it as needed (tick and click Apply Press the prompt to download the installation, One thing to note here is that sometimes it may be part of the installation, so look at when the status is installed is really loaded.

Then in the SDK Tools column we also need to install a very important application--intel HAXM, if the lack of it to run the app may be error (emulator:ERROR:x86 emulation currently requires Hardware acceleration)

So far, the basic configuration of our SDK is basic, because some of the configuration is cumbersome to install, and then let it install itself in the example demo.

Example Demo 1. Building a project

The main interface selects ' Start a new Android Studio project ', which appears as follows to create the Android Project window, set the project name and the company and the directory where you can

Next go to the Target Android Devices window, select the default phone and Tablet (which means running on the phone), and then set the API version (choose Android 8.0 here, of course)

Then go to the Layout Selection window and we'll select an empty layout here (empty Activity)

Next is the configuration, which is the default

Then wait a few moments to create the project successfully (note: The message in the picture indicates an error, this can be done first, the following will refer to the resolution)

2. Creating the simulator

Open the simulator settings (ADV Manager), click on the "Create Virtual device" in the middle of the simulator device selection, we choose Nexus 5 here (because of its resolution--XXHDPI, of course, can also choose according to their preferences)

Next choose the system picture, here or choose 8.0 (but note that in advance to download, and if it is careful enough, we can see that these Abi are X86, which also explains why we need to install the Intel HAXM)

Choose the right after the simulator configuration, again by default, click Finish will see the list of newly created simulator

3. Running

Back to the editor main form, for the error reported in the message just now, we can see that the next line has the install statement, click on it and wait for it to automatically install the desired configuration (it may take longer)

After the installation of the visible interface, and we will find in the top right of the app word, which means that the app is ready

Then we click the next green Run button, will pop up a device selection, we choose the simulator just created, click Confirm to see the device is starting, wait a moment

Well, after a long wait, we can see the Android.

This concludes the demo.

Additional Information

(1) Sometimes we may encounter the following error when running:Failed to finalize session:install_failed_invalid_apk

This error is the APK signature error, the workaround is: Select Clean Project in the top Bulid toolbar and run it here

(2) In addition, sometimes the message Bar error will give some similar to the above install ... When we click Install to resolve

The above is my introduction to the Android Studio installation and configuration process, and the first example of the program shows that, due to different machines, the intermediate process may be slightly different.

Wen Mei: At that time the author in the actual operation walked a lot of pits, fortunately finally jumped out, I hope this article can give you some inspiration and help, less go some detours. If you have questions about the article, we welcome you to exchange messages and learn from each other.

Android Studio installation, configuration and first program demo

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.