Android development environment Construction and common problem solving methods

Source: Internet
Author: User

In the era of mobile Internet, Android's share has already surpassed Apple. The advent of Android has undoubtedly accelerated the popularity of mobile internet, mobile phone operating system is already the world of iOS and Android, what Winphone and the like can say nothing about them. Remember doing a simple Android2.2-based application three years ago. It was just for fun, so there was no documentation, and then there was no continuing Android development because of the work. Take the time to toss and toss the Android development. To develop an Android app, you first need to install the Android development environment, and the steps to build the Android development environment are documented below.

First, environment and required software:

Operating system: Win7 32-bit

Download Android Studio:http://developer.android.com/sdk/installing/index.html?pkg=studio (need to climb gfw, you know)

Download jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html (version 1.7 and above)

Second, installation steps

1. Install Java

See the latest version of Android studio on Android's website for support in jdk1.7 and above. So the first step is to download JKD. Find the appropriate version of the JDK download on the http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  

Since I am a 32-bit operating system, the download is jdk-8u60-windows-i586.exe. If the operating system is 64-bit, you need to download Jdk-8u60-windows-x64.exe. After downloading, the installation can be done by default. Since I have previously configured the JRE, I need to change the javahome.

Computer--"right button, attribute--" Advanced system attribute--"advanced-" environment variable--"system variable add java_home

   

In this step, Java is ready to install.

2. Install Android Studio and create a project

Double-click the Android-studio-bundle-141.2178183-windows.exe step-by-step installation. Nothing special, because I adopt the way of online installation. So the first time to launch a need to download some of the components needed for Android, so here need to climb GFW, according to their own situation set (the industry is popular in a word called not FQ program Ape is not a good program ape). The interface is as follows when the installation is complete for the first time.

  

Select the first item, Start a new Android Studio project. The following is also a step by step as required to fill in.

  

Choose your phone and tablet options here

  

Finally, select blank activity to

  

At this point, an Android project is created.

3. Running Android

Because my machine configuration is relatively low, and running Android emulator is very resource-intensive. And the first time you load the need to initialize a lot of configuration, so the first run when the speed and the snail is no different. Conditional brother and sister can change Mac or early change a Mac.

    

Select the appropriate device in the pop-up selection box.

At this point, everything went well, and then there was a problem running the simulator.

Third, frequently asked questions

1. Intel HAXM is not installed

D:\ANDROID\SDK\TOOLS\EMULATOR.EXE-AVD nexus_5_api_23_x86-netspeed Full-netdelay noneemulator:ERROR:x86 Emulation currently requires hardware acceleration! Please ensure the Intel HAXM is properly installed and usable. CPU Acceleration Status:hax kernel moduleis not installed!

The reason for the exception is the ensure Intel HAXM is properly installed and usable. Description to install Intel HAXM, so a few, found that the Android SDK has come with Intel HAXM. The Intelhaxm-android.exe installation is then found in the Sdk\extras\intel\hardware_accelerated_execution_manager directory.

  

However, the following problems occurred during installation.

   

So I collected some online and then looked at the mistake. said that virtualization did not open, there are similar cases on the Internet, such as: http://www.cnblogs.com/csulennon/p/4178404.html This blog is said to be the problem. Then restart the computer, set virtualization to enable.

Can be installed properly after rebooting. After installation, the Android emulator continues to run, but another exception occurs.

2, simulator RAM is too large

D:\ANDROID\SDK\TOOLS\EMULATOR.EXE-AVD Nexus_5_api_23_x86-netspeed Full-netdelay noneemulator:WARNING:Requested RAM size of 1536MB is too large foryour environment, and is reduced to 1152mb.emulator:device FD:596HAXM is isn't working and emulator runs in emulation modeemulator:the memory needed by ThisAVD exceeds the max specified in your HAXM configuration.emulator:AVD RAM size= 1152MBEMULATOR:HAXM Max RAM size= 1024mbemulator:you might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode. Cannot set up guest memory' Pc.ram ': Invalid Argumenterror accepting connection, aborting

Or

D:\ANDROID\SDK\TOOLS\EMULATOR.EXE-AVD nexus_5_api_23_x86-netspeed Full-netdelay noneemulator:device FD: 584' Pc.ram ': Invalid Argumenterror accepting connection, aborting

Finally, the emulator's RAM is changed to 512

Run the AVD again, at which time the AVD will function properly. At this point, the Android development environment is built up, but the speed and the same snail. i3, 4G of machine memory is almost eaten up, conditional or change a Mac.

Android development environment Construction and common problem solving methods

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.