Chapters

Hide chapters

Android Apprentice

Third Edition · Android 10 · Kotlin 1.3 · Android Studio 3.6

Before You Begin

Section 0: 4 chapters
Show chapters Hide chapters

Section III: Creating Map-Based Apps

Section 3: 7 chapters
Show chapters Hide chapters

6. Creating a New Project
Written by Darryl Bayliss

It’s time to say goodbye to Timefighter and move on to your next app. This new app, ListMaker, allows you to create handy lists that you can look at later.

First though, you need to create a project where the app code will reside. The previous section skipped alot of discussion about how to create a new project, because the aim of the section was to get you building an app as quickly as possible.

This chapter will go through those steps to create a project again, with each step being explained.

In this chapter, you’ll:

  1. Give your project an appropriate name and initial package structure.
  2. Learn about each step of the project set up process and the associated screens.
  3. Set up your new project, ready to edit.

Getting started

Open Android Studio, and you’ll see a welcome window like this:

There are some useful features in Android Studio worth pointing out on this screen.

  • Start a new Android Studio project: Starts creating a new project for you to build your app. You’ll use this later.

  • Open an existing Android Studio project: Lets you navigate through your computer’s folders to find and open an existing Android Studio project.

  • Check out the project from Version Control: Opens an Android Studio repository that’s pulled from the internet and onto your computer.

Because Android Studio is built on IntelliJ, an IDE from the company JetBrains, you get access to powerful version control tools directly inside Android Studio.

Clicking Check out project Version Control presents the version control systems that Android Studio supports, including Git and Mercurial. Android Studio also includes built-in support for Google Cloud.

If you don’t already use another version control system, you might consider using the tools within Android Studio for versioning control.

  • Profile or debug APK: Gives you the option to select an .apk file from your computer’s file system and run it on a device or emulator. This is helpful for gathering useful information about the app. The .apk file is the file produced by the Android build system.

The information you can gather ranges from the size of the app and its contents, to more sophisticated information gathered during runtime, like memory usage and network activity.

The Timefighter .apk is open here, showing the size of the app
The Timefighter .apk is open here, showing the size of the app

  • Import project (Gradle, Eclipse ADT, etc.): Provides a way to import Android projects that have a complex build system or don’t use Gradle for their build system. If you have an Android app built using a different tool or an archive project to maintain, this is the place to go.

  • Import an Android code sample: Opens a window to showcase a collection of examples projects, provided by Google to demonstrate Android features. You can find Android Studio projects covering most topics. From using emojis in your app, to more technical topics such as keeping your users’ data secure.

With the options available at the welcome window covered, it’s time to begin creating the Listmaker project. On the welcome window, click Start a new Android Studio project to begin creating your app.

Creating a new Android project

After you click Start a new Android Studio project, a new window appears prompting for the project type.

Along the top of the window, is a selection of tabs that give you access to project setups for a specific version of Android.

Android runs on many different devices with different hardware. It extends beyond phones and tablets and runs on wearables such as watches, fitness trackers, television sets, and automotive systems within your car.

It even runs on various electronics grouped under a wide umbrella known as the Internet of Things.

Android has different APIs, depending on the type of hardware you’re building for. Trying to run an app on an Android watch when it’s built for a phone will likely have issues. The Choose your project screen helps to avoid that by getting you set up with what you need.

Take a moment to look at the available options. When you’re ready to progress, ensure the Phone and Tablet tab is selected. Then, select Basic Activity and click Next.

The next window requests information about your project.

The field at the top, Name, is where you enter the name of your app. Type Listmaker into this field.

The second field, Package name, is used to identify the packages within your app. Packages organize how your code is structured, so it’s best to name them in a way that describes what’s inside of each package.

The package name also serves as an important security feature by ensuring your app is unique on a device. Android devices refuse to run apps if two apps contain the same package name.

In the Package name field, enter com.raywenderlich.listmaker.

The Save location field, is the location where your project is created once you’re done setting it up.

Clicking the folder to the right of the text field opens the file explorer where you can select a location to store the project. There’s no wrong choice here, so choose a save location that’s appropriate for you.

Save your project wherever you like.
Save your project wherever you like.

The next option, Language is a drop-down menu where you can choose the language to build your app with. By default, this is set to Kotlin, so leave it as-is.

Targeting Android devices

The next option is the Minimum API level screen. This drop-down menu specifies the earliest version of Android your app will support.

This can be a tough decision. Choosing a recent version of Android means your app has access to more features, however, you also risk cutting off large numbers of users running older devices.

Choosing an older version means supporting more users and being unable to use newer features available to new versions of Android.

To make it easier to decide, Android Studio offers a solution to help you decide!

Below the Minimum API level drop-down, click Help me choose. A new window will appear called the Android Platform Distribution window.

The Android Platform Distribution window shows the distribution of Android versions running on devices throughout the world. This gives you the opportunity to make an informed decision about which versions of Android to support in your app.

The distribution works on a cumulative basis, shown by the percentages running alongside the colored boxes on the right. The earlier the Android version you choose, the more Android devices in the world can run your app.

It also shows an overview of the features each version supports. Android Lollipop is selected by default, and if you click each of the colored boxes, you’ll see the features each one provides.

If you need additional information about a specific version, use the link in the bottom-right of the window. You’ll be sent to the About page on the Android developer site. This is a handy page. Use it whenever you’re trying to decide on version support.

For this book, every apps minimum Android version is set to Android Lollipop, or API 21. Click Cancel to return to the Target Android Devices screen, double check that Android Lollipop is the selected minimum API level, then click Finish.

Android Studio takes your project settings and begins to create a new project for you. When it’s done, Android Studio opens your project with your new Activity ready for editing.

Where to go from here?

Android Studio provides ways to set up a new project as quickly as possible, depending on the needs of your app. Learning what the best project setup works for a project can save you plenty of time at the beinning

Sample code is only a click away on the Welcome screen, giving you another place to learn about Android features. Finally, you can work with many exciting variants of Android with just a few clicks.

In the next chapter, you’ll begin to build Listmaker and make use of RecycleViews to create lists of content.

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2026 Kodeco Inc.