Warning: Outdated Content
This MP is from a previous version of CS 125. Click here to access the latest version.
Android Studio Setup
To complete the Android CS 125 machine problems (MPs) you’ll write your Java code using the Android Studio Integrated Development Environment (IDE) and test your apps using the Android Emulator. This guide will help you install and configure this important and powerful development tool.
1. Android Studio
Follow the instructions below that are appropriate for your machine. But keep in mind that installing new software can be challenging, so don’t be discouraged if you get stuck. We’re here to help! Come to office hours or post on the forum in the Android Studio category.
For Fall 2018 we are using Android Studio version 3.2, which is the latest available as of October 2018. Please install this version of Android Studio and continue using it throughout the semester. Minor upgrades are probably safe to install. If a major upgrade is released, the course staff will let you if it is safe to use.
Once you have installed Android Studio, continue by installing the Checkstyle-IDEA IntelliJ plugin. It’s the same one that you used for your Java assignments using IntelliJ, but should also work on Android Studio, and you can follow the same instructions.
Note that our CS 125 plugin is not yet compatible with Android Studio. We hope to fix that soon.
3. Android Emulator
An important part of Android development is to be able to test your work. If you have an Android device, you can configure Android Studio to install your test app onto it. However, if you don’t have an Android device, or want to test on devices other than ones that you own, you’ll need to utilize the Android Emulator.
The easiest way to get a virtual device set up is to start a project, build it, and then try to run it. That will launch a dialog allowing you to configure a virtual device.
4. Running on Real Devices
If you have an Android phone you can also install and run your apps on your own device, which will be faster and more fun that using the emulator. Follow this tutorial for instructions on how to configure your device properly to run your apps during development.