So you want to make an Android app for fun or profit using Android Studio? This guide is an updated “How To” covering the basics of setting up Android Studio and building a simple application.
If you are the book-reading sort, you may also be interested in reading this:Getting Started with Android Studio 2nd Edition (Mobile Development)
This guide will cover the following:
- A lightweight overview of a few core Android concepts
- Setting up and installing necessary Android tools
- Creating a simple PageView application
- Some very basic interface design
- Running the application in an emulator and seeing it work
Step 1: Get Installed
Please do the following before we get started:
- Download Android Studio from this link: http://developer.android.com/sdk/installing/studio.html
- Follow the installer instructions posted by Google as per your operating system
Installing Android SDKs In Android Studio
Once you have installed Android Studio, you will now need to download a collection of tools and SDKs required to produce a modern Android application.
Note: If you are on OSX Mavericks you might get a message stating “Android Studio Can’t be opened because it is from an unidentified developer.”
To get around this issue, navigate to the directory in Finder and “Control + Click” the Android Studio application and then click “Open” from the menu. You will then receive a new dialog which now has an “open” option. Problem solved.
Just skip this dialog by clicking “ok” here unless you have a previous installation you’d like to import settings from.
We should now be ready to start doing fun Android things…such as installing a whole bunch of SDKs and utilities!
Install All The Things
Note: You can skip this if you already have Android 4.4 related items installed. Otherwise, it may be helpful just to get a sense of what the possibilities are for working with different Android flavors.
Android Studio comes default with some basic Android tools to get up and running but it never hurts to get the latest of whatever you are developing on.
Begin by navigating to Tools->Android->SDK Manager.
This is the Android SDK Manager. You can install any older flavor of Android here as well as older tools for working with those prior Androids. For now, just verify that the 4.4 SDK is installed (just click the top level folder for 4.4 and it will select everything in that folder) and then make sure “Android SDK Tools” and “Android Platform Tools” have been selected as well.
Now click “Install 11 packages down at the bottom.”
Click the top-level item in the left hand pane and then click “Accept License” and then “Install.” Things should begin installing now. [Read more…]