Create an Android Project and Run the Project with Android Studio

android_studio_logo_1

This post runs through the online guides from Google to Create an Android project and Run your app.

Create an Android Project

1. Start Android Studio

2. (A) Click File, (B) New and (C) New Project…

new_project_2

3. Use:

Application name: My First App

Company domain: example.com

…leave all other settings and click Next

name_app_my_first_app_3

4. (A) Select API 28: Android 9.0 (Pie) and (B) click Next

set_api_28_4

5. (A) Leave Empty Activity selected and (B) click Next

leave_empty_activity_5

6. Leave the settings in the Configure Activity screen and click Next

configure_activity_6

7. Click Finish

finish_component_installer_7

You’ll see some processing:

setting_up_project_8

…and

project_setup_9

8. (A) Click View, (B) click Tool Windows and (C) click Project (or press Alt+1)

click_project_10

9. Find app > manifests > AndroidManifest.xml

find_androidmanifest_xml_11

10. Find app > java > com.example.myfirstapp > MainActivity

main_activity_12

11. Find app > res > layout > activity_main.xml

find_activity_main_xml_13

12. Find Gradle Scripts > build.gradle (Module: app)

find_build_gradle_14

Run the App on an Emulator

1. (A) Click Run then (B) click Run ‘app’

run_app_15

2. Click Create New Virtual Device

create_new_virtual_device_16

3. (A) Click Pixel and (B) Next

select_pixel_17

4. Click Download by Pie

click_download_by_pie_18

You’ll see:

component_installer_downloading_19

5. Click Finish

component_installer_finished_20

6. Click Next

next_21

7. Leave the defaults and click Finish

leave_virtual_device_defaults_22

8. With Pixel API 28 selected click OK

pixel_api_28_selected_23

After a (long) bit you’ll see:

virtual_device_24

9. Click, hold and pull up

pull_up_apps_page_25

10. Click on My First A…

click_my_first_app_26

After some time you’ll see:

app_open_27

References

  • Create an Android project at [link]

  • Run on an emulator at [link]

  • Android Studio icon from [link]