Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Create An Android App Start To Finish

It was recently requested that I show how to create an Android app from start to finish using a text editor and command line. Although the process isn’t difficult, it might not be so straight forward for a first time developer. The scope of this article should cover the following:

  • How to create a new Android project using a terminal window
  • Creating a signing keystore for deployment to the app store
  • How to submit to the app store and be successful

This example assumes that you have already downloaded the Android SDK and installed it. In addition to having the SDK, it is a requirement to have installed Android API 14 (4.0.0) as you will need that for building. Although there are many ways to work with Android, we will be using Apache Ant for building our application.

Creating Your Android Project

Using your command prompt, we will be creating a project as explained in the Android documentation:

android create project \
--target <target_ID> \
--name <your_project_name> \
--path path/to/your/project \
--activity <your_activity_name> \
--package <your_package_namespace>

To keep consistency with this tutorial, let’s create our project like the following:

android create project --target 14 --name ExampleProject --path ./ExampleProject --activity ExampleActivity --package com.nraboy.exampleproject

This should create a fresh Android project for 4.0.0 (Ice Cream Sandwich) targets.

Creating a keystore for signing your Android app

Using your terminal, we will be creating a keystore for signing your app like explained in the Android documentation:

keytool -genkey -v -keystore my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Create Android Keystore

After entering the command, you will be prompted with a set of questions. Answer them to the best of your ability. Leaving a field as unknown shouldn’t cause any negative impact when signing your apps. It is very important that you do not lose this keystore and that you remember your password to the keystore. Once you sign an app with it, the only way to update the app is with the same keystore. Losing it will render you in big trouble.

Now that you’ve got your keystore, there are a few things that must be done in order to use it in your build process. Go ahead and copy it into your Android project at the root and then crack open the ant.properties file. If it doesn’t exist, create it. Assuming you’ve been copying what I’ve done so far, add the following two lines to the file:

key.store=exampleproject.keystore
key.alias=exampleproject

Now when you try to create a release build, Ant will use your keystore to sign it. You will be prompted for your keystore password two times during this build process.

ant release

Running the above will start the release build process leaving you with an APK to submit to the app store. The file will be named something like ExampleProject-release.apk not to be confused with the many other APK files made in the build process.

Submitting your Android app to the app store

Releasing your app to the world should be a breeze at this point, but there are a few things you should already have ready before you proceed:

  • A store icon / image that is 512×512 pixels in resolution. This is usually a large version of your application launcher icon
  • At least one screenshot taken with a phone, seven inch tablet, and ten inch tablet
  • A quality listing title
  • A well written app description

There are other items that will contribute to the success of your application but those are the bare essentials.

When you’re ready, navigate to the Google Play Developer Console and choose to add a new application. This should bring up a screen asking for the application title and options to either upload your release APK file now or just create a draft for a store listing:

Add New Android Application

Because I like to make sure everything is perfect first, I prepare the store listing before I upload the APK file.

Go through the list and populate your listing with the appropriate content. Most of the fields are not required, but the more complete you make your listing, the better app store optimization (ASO) will come out of it. I strongly recommend you fill out everything if you want your application to have a good start.

When you submit your Android app for release, it usually takes a few hours to show up in Google Play. There is no review process with Google Play, you are only waiting for it to be crawled.

A video version of this article can be seen below.

Nic Raboy

Nic Raboy

Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.

Search

Follow Us

Support This Site