Android fundamentals 01.1:Android Studio and Hello World
Tutorial source : Google CodeLab
Date : 2021/04/06
Complete course : 教程目录 (java).
Note : The link in this article requires Google access
This practical codelab is part of Unit 1: Get started in the Android Developer Fundamentals (Version 2) course. You will get the most value out of this course if you work through the codelabs in sequence:
Note: This course uses the terms “codelab” and “practical” interchangeably.
In this practical you learn how to install Android Studio, the Android development environment. You also create and run your first Android app, Hello World, on an emulator and on a physical device.
You should be able to:
AndroidManifest.xml
file.After you successfully install Android Studio, you will create, from a template, a new project for the Hello World app. This simple app displays the string “Hello World” on the screen of the Android virtual or physical device.
Here’s what the finished app will look like:
Android Studio provides a complete integrated development environment (IDE) including an advanced code editor and a set of app templates. In addition, it contains tools for development, debugging, testing, and performance that make it faster and easier to develop apps. You can test your apps with a large range of preconfigured emulators or on your own mobile device, build production apps, and publish on the Google Play store.
Note: Android Studio is continually being improved. For the latest information on system requirements and installation instructions, see Android Studio.
Android Studio is available for computers running Windows or Linux, and for Macs running macOS. The newest OpenJDK (Java Development Kit) is bundled with Android Studio.
To get up and running with Android Studio, first check the system requirements to ensure that your system meets them. The installation is similar for all platforms. Any differences are noted below.
Troubleshooting: If you run into problems with your installation, check the Android Studio release notes, or get help from you instructors.
In this task, you will create an app that displays “Hello World” to verify that Android studio is correctly installed, and to learn the basics of developing with Android Studio.
If you are not planning to publish your app, you can accept the default. Be aware that changing the package name of your app later is extra work.
These are the settings used by the examples in the lessons for this course. As of this writing, these settings make your Hello World app compatible with 97% of Android devices active on the Google Play Store.
Leave unchecked the Include Instant App support and all other options. Then click Next. If your project requires additional components for your chosen target SDK, Android Studio will install them automatically.
The Add an Activity window appears. An Activity
is a single, focused thing that the user can