Write your first Android program on Android Studio

1. Android development environment construction

1. Introduction to Android:

Android (Android) is a free and open source operating system based on the Linux kernel (excluding GNU components). It is mainly used in mobile devices, such as smartphones and tablets, and is led and developed by Google and the Open Handset Alliance . The Android operating system was originally developed by Andy Rubin and mainly supports mobile phones.

2. Android development history:

  • In August 2005, it was acquired and injected by Google.

  • In November 2007, Google and 84 hardware manufacturers, software developers and telecom operators formed the Open Handset Alliance to jointly develop and improve the Android system, and released the source code of Android.

  • In October 2008, the first Android smartphone was released, manufactured by HTC. Android has gradually expanded to tablet computers and other fields, such as TVs, digital cameras, game consoles, smart watches, large car screens, smart homes, etc., and has gradually become an indispensable system software in people's daily life.

  • In the first quarter of 2011, Android's global market share surpassed that of Symbian for the first time, ranking first in the world.

  • In the fourth quarter of 2013, the global market share of Android platform mobile phones has reached 78.1%. On September 24, 2013, the operating system Android developed by Google ushered in its 5th birthday, and the number of devices using this system in the world has reached 1 billion.

  • In 2019, Google officially announced that there are 2.5 billion active Android devices worldwide, not including most Chinese devices.

  • Android releases a major version almost every year, and the technology updates and iterations are very fast. The release time of several major versions of Android is shown below.

Android version number Corresponding API release time
Android 13 33 February 2022
Android 12 31 October 2021
Android 11 30 September 2020
Android 10 29 August 2019
Android 9 28 August 2018
Android 8 26/27 August 2017
Android 7 24/25 August 2016
Android 6 23 September 2015
Android 5 21/22 June 2014
Android 4.4 19/20 September 2013

2. Android Studio development environment

Official website download link: https://developer.android.google.cn/studio/index.html

The computer memory should be more than 8GB. My broken computer is already stuck.

CPU1.5GHZ or above, C disk free space above 10GB.

Installation, the same old way, click the next step.
insert image description here
insert image description here
insert image description here
Once done, open Android Studio and that's it.

3. The first Android program

Select the new project in Android Studio, select Empty Activity

insert image description here
SDK environment select Android 9.0
insert image description here

Click Finish, then choose to create a virtual Android virtual machine, select Google's pix2,

insert image description here
Select the Android 11 system, and click Finish to generate the Android virtual machine.
insert image description here
Then there is the following interface, click the green arrow in the upper right corner, and you can run the first program!
insert image description here
operation result:
insert image description here

problems

1. SDK not found

Click the SDK Manager in the upper right corner of Android Studio
insert image description here
to select the version you want to download and download it.
insert image description here

2. The Android virtual machine cannot be found

insert image description here

Select the device on the main interface to run.
insert image description here

Guess you like

Origin blog.csdn.net/qq_42242452/article/details/124699991