Android AppsFor a while now, I have been meaning to write some articles showing how to create your own Android apps. Unfortunately, I never took the time to do it. But, that is all going to change. Over the next few days, I am going to teach you everything you need to know about creating your own Android apps, deploying your apps to your Android device, getting your apps added to Google Play, and even how to make money from your apps by including advertisements in your apps. If you want, you can also choose to charge a fee for your apps, but that’s not going to stop me from teaching you how to add advertisements into your apps anyways. So, let’s begin!

The first thing you will need for creating your own Android apps is the Java Development Kit (JDK) from Oracle. In this tutorial, I will be working with JDK7. So, I recommend you use the same to keep from having any unexpected issues. You can download JDK7 for free from http://www.oracle.com/technetwork/java/javase/downloads/index.html. When you get there, you will see a section labeled “Java Platform, Standard Edition”. Underneath it, click the blue button under “JDK”. This will take you to a page where you must read and accept the Oracle Binary Code License Agreement for Java SE. Make sure you click the radio button to accept the agreement. Otherwise you will not be able to download the software.

Accept the Java License Agreement

With the Accept License Agreement button selected, click on the link next to Windows x64 (jdk-7U17-windows-x64.exe). For the purposes of this series of articles, I will be working with 64 bit Windows 7. In the event that you are using something other than Windows, you will need to select the version that is compatible with your operating system and processor. At the time of writing this article, the latest version is 7u17. Depending on when you are reading this article, the version will most likely be different. Therefore, you will see a different link to download from. Once you have the JDK downloaded, go ahead and run it and follow the on screen instructions until you have finished installing Java7.

After you have installed Java, the next thing you will need for creating your own Android apps is the Eclipse IDE. If you’re not familiar with Eclipse, it is an integrated development environment (IDE) that includes everything you need for almost any programming language. I’ve used Eclipse for developing apps I’ve written in C, C++, Perl, PHP, Python, Flex, and many other languages. But, for the purposes of this article, we will be using Eclipse for working with Java. You can download Eclipse for free by heading over to http://www.eclipse.org/downloads/ and selecting the version that works for you. For our purposes, we will need to download “Eclipse IDE for Java Developers”. As of right now, the download site has links for downloading 4.2 SR2 (aka Juno) and that’s the version I’ll be using throughout this tutorial series. The download site includes downloads for Windows, Linux, & Mac and come in either 32 bit or 64 bit. Again, since I am running 64 bit Windows 7, I will click the 64 bit link.

Eclipse Download Link

That will take you to the next page where you can decide where you want to download Eclipse from. To keep it simple, I’d stick with the first download site listed at the top. However, if you have any problems with that link, you can always scroll down and select a different download site from the list of mirrors. In fact, you might want to select a mirror that is located geographically closer to you for a faster download. Once you have downloaded Eclipse, the installation is extremely simple. The only thing you have to do to install Eclipse is unzip it to your filesystem. Any extractor will work, including the one that comes built into Windows 7. Before you run Eclipse for the first time, I would recommend that you move the unzipped folder to a more permanent location such as the root of your C:\. After you have unzipped Eclipse, you can run it by going into the unzipped folder and double-clicking the “eclipse.exe” file. Depending on how often you will be using Eclipse, I would recommend right-clicking on the “eclipse.exe” file and choosing “Send To > Desktop (create shortcut)”. This will make it easier to get to going forward.

Now that you have Java and Eclipse ready to go, the next piece you will need to download is the Android SDK. You can get it from http://developer.android.com/sdk/index.html. On that page, you will see a big blue button that says “Download the SDK ADT Bundle for Windows”. Since you have already downloaded Eclipse, you will not need this version of the SDK. Instead, toward the bottom of the page, you will see an arrow pointing down followed by the words “USE AN EXISTING IDE”. Click those words to drop down another section where you will see another blue button that says “Download the SDK Tools for Windows”. Click that button to begin the download.

Android SDK Download

After you have downloaded the Android SDK, go to the folder where you downloaded the SDK to and run the installer. Follow the onscreen instructions until the SDK has finished installing. When the installation has completed, click on Start and go to All Programs > Android SDK Tools and click on SDK Manager. You will need to check and install Android SDK Tools, Android SDK Platform-tools, SDK Platform, and ARM EABI v7 a System Image. Some of the items may already be installed. If they are, you can skip them. If they are already installed, but show that they have updates available, go ahead and install the updates while you’re at it. Since I had already installed everything before, I can’t show you what your screen will look like at this point. However, I will show you what I see when I run my SDK manager right now. You will see that I chose to install API 16 & 17, but you might also choose to select some of the older versions as well. That all depends on how many devices you want to support with your app. Keep in mind that devices running older versions of Android are not compatible with all of the latest functionality found in the SDK. I chose APIs 16 & 17 because there aren’t a whole lot of devices out there any more than run anything older. For those that are, I don’t want to support them anyways as I want the latest and greatest functionality in my apps. I also chose to install the documentation and some of the other pieces. But, you don’t have to download and install those if you don’t want to. Just make sure you get the items listed above.

Android SDK Manager

CLICK TO ENLARGE

I will warn you now that the SDK installation will take a while to run. But, once everything is installed, you will be one step closer to writing your first Android app and even making some money from it. But, before you can jump into writing any code, you will first need to setup a device to test your application on. If you don’t have a physical Android device, don’t worry. For now, we will be working with the Android Emulator. To setup your Emulator, click on Start and go to All Programs > Android SDK Tools and click on AVD Manager.

With the AVD Manager open, click on the “Device Definitions” tab and click the “New Device…” button. This will popup a dialog window where you can setup a simulation of the device you plan on running your app on. Since I own a Motorola Droid Razr, I want to setup my device to simulate it. Before you go thru the steps of setting up a new device, check to see if your device is already in the list of predefined devices such as the Nexus S, Nexus One, Nexus 7, Galaxy Nexus, and so on. The main thing to keep in mind here is the screen size and resolution. If you see something that closely matches your device, you can edit that device instead of creating an entirely new one. Since I own a Motorola Droid Razr and don’t see anything in the list that includes my screen size and resolution, I had to click the “New Device…” button and define my device there.

For the name, I chose “Motorola Droid Razr”. According to the Motorola specification page for my phone, I entered “4.3” for the screen size and “540×960” for the resolution. I also picked the sensors and cameras that my phone has. Even though my phone has 1GB of RAM in it, I still stuck with the basic “512 MiB” for the memory section. As for everything else, I just left the default settings and clicked the “Create Device” button.

Create New Android Device

CLICK TO ENLARGE

Once you have your device created, click on the “Android Virtual Devices” tab of the AVD Manager and click the “New…” button. You can enter whatever you want for the AVD Name. I chose to name mine “Emulator”. Next, select the device you created above from the “Device” drop down list. For the CPU/ABI field, select ARM (armeabi-v7a) since that was what we picked in the SDK Manager earlier. You can leave everything else as is and click the OK button to create your virtual device.

Create Android Virtual Device

CLICK TO ENLARGE

Now that you have your emulator setup, you can close the SDK Manager and AVD Manager. That’s it for the first part of this multi-part series. Tomorrow I will show you how to setup your first Workspace and project in Eclipse and how to configure Eclipse to work with your new Android SDK and virtual device. Until then, be thinking about what kind of app you want to create.

Create Your Own Android Apps for Fun or Profit
Part 1: Downloading and Installing Java, Eclipse, and the Android SDK
Part 2: Configuring Eclipse and Creating Your First Android App
Part 3: Creating a Layout and Adding Some Code
Part 4: Testing Your App with the Android Emulator
Part 5: Monetizing Your Android App with Google AdMob
Part 6: Running Your Android App on Cellphones and Tablets
Part 7: Publishing Your Android App to the Google Play Store

Thank you for your interest in my site. If you find the information provided on this site useful, please consider making a donation to help continue development!

PayPal will open in a new tab.
$2.00
$5.00
Other

Related Posts

Tagged with:  

Leave a Reply