EECS 285 Android Studio Setup and First App
First App Due Wednesday, 18 Nov 2020, 8pm
This tutorial will help walk you through setting up your computer with Android Studio for Project 4.
Table of Contents
- System Requirements
- Download and Install
- Complete the First App Tutorial
The system requirements for Android Studio are listed at the bottom of the download page. If your computer does not meet the minimum requirements to run Android Studio and you’re located near campus, please see the EECS Departmental Computing Organization in 2917 BBB for a loaner computer.
In order to run the Android emulator on Windows or Linux, your system must have hardware virtualization enabled. Mac computers usually already meet these requirements.
When launching the Android Emulator, if you see an error about hardware virtualization, you must enable it in the system BIOS for your computer. Refer to the following:
If your computer is able to run Android Studio, but not the emulator, you can use a physical Android Device instead of the emulator.
Download and Install
First, download and install Android Studio. Under “Android Studio package”, click on the link for your platform. (If you are on Windows, the most likely one you want is “Windows (64-bit) Recommended”.) Accept the agreement, download, and run the installer. (On Mac, drag the “Android Studio.app” icon to the “Applications” icon.)
You should see the Missing SDK window for the Android Studio Setup Wizard. Click “Next”.
At “SDK Components Setup”, select both “Android SDK” and “API 30: Android 11.0 (R)”. Click “Next”.
At “Verify Settings”, click “Finish” and wait for installation to complete. You may need to enter your password during installation.
Complete the First App Tutorial
Follow the tutorial to build your first app. Make sure to follow the entire tutorial until you complete the ‘Start another activity’ section. Please use the Java examples, not Kotlin.
When setting up your project, set your application name to be
<uniqname> First App, where
<uniqname> is your uniqname. If you
are working in a partnership, then use both of your unqinames, in
alphabetical order, separated by an underscore. For example, if I am
working alone, I would use the following name:
If I am working with
schatzju, then I would use the following:
Ignore the message at the bottom about application names beginning with an uppercase letter.
For the package name, use
Select API 24 for the minimum API level. You must use API 27 or lower. We recommend API 24 since it gives you more support for Java 8 features than earlier versions:
After your project is created, you need to configure it to support Java 8. Select “File” in the application menu and then “Project Structure”. It may take a little for “Project Structure” to show up if there is an ongoing download. Click on “Modules” on the left, then “app” in the pane that appears. Then set both “Source Compatibility” and “Target Compatibility” to $JavaVersion.VERSION_1_8. You may also use the drop down menu to set this:
You will also see that “Compile SDK Version” is set to a newer version than the target API you selected – this is fine, and you should not change it.
Complete the entire tutorial. At the end, you will have an app with two activities, the first of which has a text field and a button, and the second of which displays the text entered in the first activity.
Submit the following files to the autograder.
src.zip, an archive of the sources for your project (the
app/srcdirectory for an Android Studio project)
appdirectory of your project (NOT the
build.gradlethat is one level up from the
Refer to the guide on preparing files for submission for how to obtain the required files.
As per course policy, we will grade your last submission to the autograder. It is your responsibility to ensure that your last submission is complete. Your app must compile correctly on the autograder for us to be able to grade it.
The first app is worth 10% of your grade for Project 4.
Working with Git
If you are using Git for version control, we recommend using this
.gitignore file, which excludes unnecessary files
(e.g. IDE settings, build outputs, etc.). Rename the file to
.gitignore and place it in the top-level directory for your project.
As always, make sure that your Git repository is private, as required by course policy.