Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 5.6 KB

getting_started.md

File metadata and controls

85 lines (54 loc) · 5.6 KB

Getting started

Setting up your workshop development environment

This workshop is aimed at the intermediate Java or OO programmer who wants to start with native Android development. As a prerequisite, please set up a working Android development environment. Please check if you have already installed—and if not, download and install—the following software on your computer:

1. Android Studio

Install the Android Studio bundle, which includes:

  • The Android Studio IDE, which is based on the community edition of IntelliJ IDEA.
  • All the Android SDK tools to design, test, debug, and profile your app.
  • The latest Android platform to compile your app.
  • The latest Android system image to run your app in the emulator.

If Android Studio gives any errors concerning your version of Java, you may need to update to Java Software Development Kit (JDK) version 8. Note that a Java Runtime Environment (JRE) is not enough to do Android development; you need the Java SDK.

2. Git client (optional)

A Git client or command line tool is recommended to clone the workshop repository. Sourcetree is a pretty cool Git GUI client. If you don't have an internet connection, or don't want the hassle of working with Git, you can get (or download) a zip-file with the repository contents on the day of the workshop.

3. Ensure everything's up-to-date

Android Studio Check for updates

After you have installed Android Studio you might need to update to the latest version. Fire up Android Studio and select “Check for Updates…” under the “Help” menu. We will use a modern version of Android Studio for this workshop.

Also check that you have the latest “SDK Tools”, “Android platform” and “Extras” installed. You can access the SDK manager by clicking on the SDK Manager Icon SDK Manager Icon in the toolbar. Your configuration should look something like the screenshots below, but using whichever latest versions are available.

SDK Tools

You only need the latest versions of the “Tools”, “Platform-tools” and “Build-tools”

Android 6.0 (API 23)

Select the packages that are selected in the screenshot. If you don't have an Android device install one of the Intel Atom images so you can create an emulator later on. If you have enough hard disk space simply click the checkbox before the “Android 6.0 (API 23)” folder to select and download everything.

Extras

Simply install everything in the “Extras” section for the workshop. The “Google USB Driver” is only compatible with Windows machines, so install that if you run Android Studio on Windows and want to connect your dev phone via a USB cable.

Specifically, you should have:

  • Under “Tools:
  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build=tools
  • Under a modern Android version (as of this writing, “Android 6.0 (API 23)”):
  • SDK Platform
  • Documentation for Android SDK (recommended)
  • Samples for SDK (recommended for learning)
  • Under “Extras”:
  • Android Support Repository
  • Android Support Library
  • Google Play services
  • Google Repository

Once you have selected all the packages above click the “Install Packages” button and sit tight.

4. Prepare a device

Preferably we would like you to connect your phone to your computer and run and test the samples on a real device. If you don't own an Android device you can install an Android emulator, also known as an Android Virtual Device (AVD).

Physical device

Plug in your device through USB, and make sure it's set up for USB debugging and permits installing apps from unknown sources.

Note: If you're connecting your Android device to a Windows machine, make sure you have installed the correct device driver. If you have ever successfully connected your Android device to your PC, for instance to exchange files, you probably already have it.

USB Debugging

USB Debugging

If you want to run apps on your device, the first thing you need to do is enable “USB debugging” on the device itself. You can do so by starting the Settings app on your device and selecting “Developer Options” → USB Debugging”. If you don't see the developer options item in your settings menu, you can enable them by clicking on the “Settings” → “About Phone” → “Build” item a couple of times to enable them.

ADB permission

Now that you've enabled the developer settings, you need to make sure your laptop or computer is authorized to use your device. When you plug in your device, you should get a dialog on your device:

Allow USB debugging?

If you intend to use your device with your computer more frequently, tick "Always allow from this computer" and press OK.

Virtual device (Emulator)

Install at least one Android Virtual Device (AVD) running Lollipop for this workshop. All the capabilities of the AVD Manager are accessible directly from the Android Studio interface. Click the AVD Manager Icon AVD Manager Icon in the toolbar to open it and create new AVDs.

##Let's go!

Once you've installed all the software, necessary development kits and set up a device, you are all set for the workshop!

You may want to keep this cheatsheet at hand. Now let's go to lesson 1!