Android studio--First App HelloWorld

Source: Internet
Author: User

    • Create a project

Open File->new->new Project for Android Studio.

On the new project page, this page contains the application name, company Domain, the package name, and project location four items, modifying application name to HelloWorld, Click Next.

On the target Android device page, this page contains phone and tablet, Wear, TV, Android Auto and glass, and by default only the phone and tablet are selected, select the SDK you want, and click Next.

On the add an activity to mobile page, this page contains a number of kinds of activity, the default selection blank activity, no changes, click Next.

On customize the Activity page, this page contains activity name, Layout name, Title, Menu Resource name four items, four items have default values, can not be modified, click Finish.

So far, a HelloWorld project has been created.

    • Run

Click on the toolbar to run the Android emulator. Operation Result:

  

So far we've finally created the simplest app. The process of being from scratch is still quite exciting.

    • Analysis

Now go back and analyze the Hellowworld project to see what he has.

Put Android into project in the Project window so you can see all the folders and files for the HelloWorld project. Open the app directory, in the App->build->output->app directory, there is a app-debug.apk. This apk is a HelloWorld installation package that can be installed on your phone.

The app directory also includes the Java directory (source file), res (resource file), res contains androidmanifest.xml, layout, values, drawable, menu, minimap, etc.

Only one has seen through the whole project, to really understand the meaning and role of each directory, file, this will deepen their understanding, so that they can be faster and better understanding.

  

Android studio--First App HelloWorld

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.