Android Project from Scratch

Writing an Android app is an exciting and fun and while at it there is serious money to be made.

This post shows you how to start a new project and here is where things start getting more interesting. A project in Android Studio is a group of files that make-up your app; these are the source code files, user interface files amongst other files you will learn about on this blog .

1. Begin by launching Android Studio and then select New Project, or you can choose File > New > New Project  (If you don’t have a project opened, in the Welcome to Android Studio window, click Start a new Android Studio project). The below window appears.

1st AS Window

2.In the New Project screen, enter the following values:

  • Application Name: “My First App”
  • Company Domain: “”

These values will be used to form your app’s package name. Package names are unique; if company name you can use it but do try to use a name unlikely to collide with that of another developer.

You might want to change the project location, but leave the other options as they are. When you press next you will get this window.

2 AS Window - Target

3. In the Target Android Devices screen, it is recommended to keep the default values and click Next. A low API value makes your app available to a large number of devices but in turn makes you do more coding work to ensure backward compatibility with devices running on earlier versions of Android that may not support new features added in newer Android versions.  You can also choose to click “help me chose” to see what proportion of Android devices on each platform release. For our first ever app will keep it simple and just target Phones and Tablet.

3 AS Activity Window

4. You’re free to start a new project with an empty activity in which case you would select Empty Activity and click Next.

4 AS Window - Customize Activity

5.In the Customize the Activity screen, keep the default values and click Finish.

After some processing, Android Studio opens the IDE. Now take a moment to review the most important files autogenerated for you by the Android Studio. You can also take time to review onscreen tips as these will come handy.This is the same process you will repeat for most of your app projects.

Now we are ready to test our project which we have named “My First App”. Android Studio lets you run your code, either through an emulator or through a  real Android device connected to your computer using a USB cable.

It is much more fun to run your apps on a real android phone. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible you first need to enable USD Debugging by navigating to Settings > About phone and tap Build number seven times until you see a prompt message saying you are a developer or something similar on your phone’s screen.

Now you are ready to run your first brand new app by justing hitting the Run Button and the apps APK will be installed on your phone.

Run Button

Congrats for writing your first Android app, I guess it was easy as a pie!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.