In this codelab, you create an Android app with the Empty Activity project template provided by Android Studio.
To create a project in Android Studio:
Double click the Android Studio icon to launch Android Studio.
In the Welcome to Android Studio dialog, click New Project.
The New Project window opens with a list of templates provided by Android Studio.
In Android Studio, a project template is an Android project that provides the blueprint for a certain type of app. Templates create the structure of the project and the files needed for Android Studio to build your project. The template that you choose provides starter code to get you going faster.
Make sure the Phone and Tablet tab is selected.
Click the Empty Activity template to select it as the template for your project. The Empty Activity template is the template to create a simple project that you can use to build a Compose app. It has a single screen and displays the text "Hello Android!".
Click Next. The New Project dialog opens. This has some fields to configure your project.
Configure your project as follows:
The Name field is used to enter the name of your project, for this codelab type "Greeting Card".
Leave the Package name field as is. This is how your files will be organized in the file structure. In this case, the package name will be com.example.greetingcard.
Leave the Save location field as is. It contains the location where all the files related to your project are saved. Take a note of where that is on your computer so that you can find your files.
Select API 24: Android 7.0 (Nougat) from the menu in the Minimum SDK field. Minimum SDK indicates the minimum version of Android that your app can run on.
Click Finish. This may take a while - this is a great time to get a cup of tea! While Android Studio is setting up, a progress bar and message indicates whether Android Studio is still setting up your project. It may look like this:
A message that looks similar to this informs you when the project set up is created.
You may see a What's New pane which contains updates on new features in Android Studio. Close it for now.
Click Split on the top right of Android Studio, this allows you to view both code and design. You can also click Code to view code only or click Design to view design only.
After pressing Split you should see three areas:
The Project view (1) shows the files and folders of your project
The Code view (2) is where you edit code
The Design view (3) is where you preview what your app looks like
In the Design view, you may see a blank pane with this text:
Click Build & Refresh. It may take a while to build but when it is done the preview shows a text box that says "Hello Android!". Empty Compose activity contains all the code necessary to create this app.