Table of Contents
- What is Android?
- What is Android used for?
- Which tools do I need?
- Do I need a phone to make Android apps?
- What should I do first? (Install Java)
- Now what? (Install Android Studio)
- Install Necessary Packages
- Setup your phone/tablet
- Java Resources
- Get Help
- Keep in Touch
Android is a software stack for mobile devices that includes an operating system, middleware, and key applications. The Android Software Development Kit (SDK) provides the tools and Application Programming Interfaces (APIs) necessary to begin developing applications on the Android platform using the Java programming language. You should know the basics of Java programming before starting your Android journey. A good course to learn enough Java to prepare for Android programming is Udemy’s Become an Android Developer From Scratch course. More Java resources can be found at the end of this document.
Android is used for making applications (apps) that run on Android devices. This includes Android smartphones, smartwatches (Android Wear), and anything else that runs on the Android operating system (OS) like Andorid Wear, Android TV, and Android Auto. Once developed, Android applications can be packaged easily and distributed or sold either through a store such as Google Play or the Amazon Appstore.
You can write Android programs on PCs, Macs, and Linux machines. This is unlike writing apps for iOS devices which can only be done on Macs legally. You’ll need a piece of software called an IDE (Integrated Development Environment). Android Studio is now the official IDE for Android, which we recommend. It’s a free download and works on all platforms. Although there are other IDEs available to use with Android, such as Eclipse and IntelliJ, we are hoping to steer everyone towards Android Studio as that is the platform fully supported by Google, the developer of Android, moving forward. You will also need both the Java Development Kit (JDK) and the Android SDK. Note: the JDK is different than the JRE (Java Runtime Environment) which allows people to run Java programs. We need the JDK to be able to write Java programs.
No! Though it sure is fun to put the apps you make on your own device. The Android SDK includes a mobile device emulator — a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device.
Check to see that you have JDK 7 or JDK 8 on your computer.
-
Windows: visit https://www.java.com/verify/ to check to see if the JDK is already installed on your machine. Remember this is the JDK, not the JRE.
-
Mac/Linux: open a terminal window and type "which javac". If something appears, then you have a version of the Java JDK on your machine. If you’d like to know which version of Java you have, type “javac -version”.
-
If you don’t have Java on your machine, install the JDK by visiting Oracle’s website and downloading the most recent version of the Java SE 7 that is appropriate for your machine.
Now it’s time to download the most recent version of Android Studio, the official Android IDE. Visit http://developer.android.com/sdk/index.html to get the software appropriate for your operating system.
To set up Android Studio on Windows:
-
Launch the .exe file you just downloaded.
-
Follow the setup wizard to install Android Studio and any necessary SDK tools. (If you are new to Android Studio, you can’t go wrong with installing with default settings - you can always add additional packages later.)
To set up Android Studio on Mac OSX:
-
Launch the .dmg file you just downloaded.
-
Drag and drop Android Studio into the Applications folder.
-
Open Android Studio and follow the setup wizard to install any necessary SDK tools.
-
Depending on your security settings, when you attempt to open Android Studio, you might see a warning that says the package is damaged and should be moved to the trash. If this happens, go to System Preferences > Security & Privacy and under Allow applications downloaded from, select Anywhere. Then open Android Studio again.
If you need to use the Android SDK tools from a command line, you can access them at: /Users//Library/Android/sdk/.
To set up Android Studio on Linux:
-
Unpack the downloaded ZIP file into an appropriate location for your applications.
-
To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.
-
You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory. (Ex:
export PATH=$PATH:~/your_android_directory/android-studio/bin
) For more info, see this guide. -
Follow the setup wizard to install any necessary SDK tools.
Ensure that you have the most recent version of Android Studio:
After launching Android Studio, select the check for updates option in the toolbar.
Android Studio doesn't work right out of the box, so we will have to install some additional packages in order to make it run properly. Here are the ones we recommend; you can always add additional packages or delete unnecessary ones later.
- Open Android Studio.
- On the Welcome menu, click on Configure.
- Select SDK Manager.
- In the window that opens, select the following packages:
- Tools - this should select all items in that category.
- Android 4.4.2 (API 19)
- In the Extras category: Android Support Repository, Android Support Library, Google Repository, and Google USB Driver
- Select Install Packages.
- Accept License Agreement.
- Grab your favorite beverage or book to read; this is going to take a while.
Now is a good time as any to set up your phone/tablet if you have one. emember, you can build and test many apps with just the built-in emulator, so the connected phone/tablet is just a bonus. You have to do four things to enable testing of your apps on your device:
-
Ensure your phone will allow the installation of apps from unknown sources (the unknown source is you rather than apps from the Play Store.) Try looking under Settings → Security and make sure the checkbox for Unknown Sources is checked.
-
Turn on Developer Options under Settings if that option isn't currently available. To do this, go to About Phone, find the build number, and click on it several times until it unlocks Developer Options.
-
Allow USB debugging. Try looking under Settings → Developer Options and check the USB debugging box.
-
Connect your Android phone to your computer via a cable.
-
Courses
- [Google] (http://www.developer.android.com) - Android Studio just came out of Beta in the fall, so if you need help with Android Studio specifically, make sure you check the dates of the search results and only use recommendations/answers from the last six months. Prior to this, Eclipse was a popular IDE choice, (and will probably remain widely used for the near future) so some tutorials may give you Eclipse directions.
- Come to Android Labs. You will get the most out of our hack nights if you follow one of our suggested resources. These are the classes/books/resources that our members know the best and for which they can offer the most support. The goal of the hack night is to help you learn the skills that will assist you with programming problems you may see in your workplace; not to actually assist you with work related to your job. Asking problems specific to work projects derails the productivity of everyone at the event and may result in you not being included in future hack nights.
- Tweet us.
- Email us - WWCodeDC@gmail.com
- Check us out on Github.
- Visit our website.
- Join our Slack group.