To complete the CS 124 machine project (MP) you’ll write code using Android Studio. You’ll test your app using the Android Emulator—and on a real device, if you have one. This guide will help you install and configure these tools.
Android Studio is the integrated development environment (IDE) for Android development. To install it, follow the instructions below that are appropriate for your machine.
Keep in mind that installing new software can be challenging, so don’t be discouraged if you get stuck. We’re here to help! Jump on the tutoring site, or ask for support on the forum.
You will need a laptop or other personal computer to work on the MP. Most laptops are able to run Android Studio without too much trouble, although the emulator may be slow on older models.
If you don’t have access to a laptop or personal computer, you’ll need to explore laptop loaner programs offered by the university. There are several. If you really get stuck, please reach out to the course staff for help.
For Fall 2023 we are using Android Studio version 2022.3.1 Patch 2 “Giraffe”, which is the latest available as of October 2023. Please install this version of Android Studio and continue using it throughout the semester.
If an upgrade is released, the course staff will let you know if it is safe to use. Please don’t upgrade until you get the OK from us, since even minor upgrades may affect your ability to work on the machine project.
Begin by downloading the version of Android Studio appropriate for your machine using this link. Next, follow these instructions carefully.
Continue by installing several plugins. Which depends on whether you are using Java or Kotlin, although it’s safe to install all of them!
If you are developing in Java, install the following plugins:
We will continue to use checkstyle
to help you learn how to write beautiful and maintainable Java code by requiring you to adhere to a coding standard.
There are checkstyle
points on each Java MP checkpoint, so you want to get the plugin installed so that you can check your style as you go.
Installing these plugins is straightforward:
You should install the latest version of the checkstyle
plugin, currently 5.83.0
, and the CS 124 plugin, currently 2023.10.0.223
.
Plugin updates that are released during the semester should be safe to install.
If you are developing in Kotlin, install the following plugins:
We will use detekt
to help you learn how to write beautiful and maintainable Kotlin code by requiring you to adhere to a coding standard.
There are detekt
points on each Kotlin MP checkpoint, so you want to get the plugin installed so that you can check your style as you go.
Installing these plugins is straightforward:
You should install the latest version of the detekt
plugin, currently 2.1.0
, and the CS 124 plugin, currently 2023.10.0.223
.
Plugin updates that are released during the semester should be safe to install.
The 2023–2024 CS 124 MP uses the Android SDK version 34. You should install this using the Android SDK Manager. As of October 2023, this is the latest Android SDK available, so it may be installed already.
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. Going through the Android “Hello, World!” is also a great way to get started familiarizing yourself with app development. But you can also start with our machine project starter code.
Before you can use Git with Android Studio you may need to install the underlying Git tool itself. We suggest you start here to install Git. Once you complete the installation, Android Studio should automatically detect Git and allow you to use it to manage your Android projects.
Note that you do not need to install or use a GUI for Git or the GitHub Desktop application. We’re going to use Android Studio’s excellent built-in Git interface. So once you’ve installed Git you can move on.
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 these instructions on how to configure your device properly to run your apps during development.