Android app Development (i): Android platform Setup and development environment configuration

Source: Internet
Author: User

This article from the perspective of their own experience to share the first step of Android application development, namely, the Android platform building and development environment configuration, mainly including the platform selection and installation and the installation process often encountered problems, and finally give an example, the first Android software "Hello world! ”。


1. Android Studio software Download


You can download Android Studio directly on Baidu, or download it directly on the website www.android.com (Mainland China resources may be limited).

Note: It is recommended to use Android Studio, and it is not recommended to use eclipse or idea development platform, because Android Studio offers some optimizations to reduce the hassle of programming, which can be reflected in the following blog post that Android The benefits of studio.


2. Problems encountered during installation and their solutions


(1), Java installation and configuration

Please refer to: http://blog.csdn.net/frd2009041510/article/details/46707169


(2), vt-x start-up method

Because Android Studio needs to start hardware acceleration, so must start Vt-x, boot Vt-x is set at the time of the computer boot, do not know how to start vt-x please leave a message under this blog post.


(3) Installation of Intelhaxm-android.exe

You can see if the Intelhaxm-android.exe is installed in the SDK manager, if it is not installed, simply select Install.

SDK Manager is located in C:\Users\Fred\AppData\Local\Android\Sdk\android-sdk-windows.



(4), the creation or configuration of the simulator

The simulator is the operation of the analog code on the device and can be created on demand, as shown in the method.


(5), memory error prompt

Change the memory Ram for the device as shown in.


3, the firstAndroidSoftware "Hello World! "

(1). New Project











(2), compiling





(3), simulator display results


4, how to modifyAPPthe name and content

First enter the main function:

That

public class Mainactivity extends Appcompatactivity {    @Override    protected void OnCreate (Bundle Savedinstancestate) {        super.oncreate (savedinstancestate);        Setcontentview (R.layout.activity_main);    }

Next Enter activity_main.xml:

Finally, hold down CTRL and click:

<textview android:text= "@string/hello_world" android:layout_width= "Wrap_content"

@string/hello_world in the

Can go to:


Make changes to the following code.

<resources>    <string name= "app_name" >AndroidHello</string>    <string name= "Hello_world ">hello world!</string>    <string name=" Action_settings ">settings</string></resources >

For example, modify the following:

<resources>    <string name= "app_name" >android hello</string>    <string name= "Hello_world ">hello Android, I am fred!</string>    <string name=" Action_settings ">settings</string></ Resources>

The results after the compilation run are:




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android app Development (i): Android platform Setup and development environment configuration

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.