p4-budget

EECS 285 Project 4: Preparing Files for Submission

This guide will walk you through preparing the files required to submit Project 4.

Files to Submit

src.zip

This should be a zip archive of the src directory of your Android project. The directory should be located at app/src under your main project folder. You can create the archive at the command line if you have the zip utility installed:

$ cd app  # enter app directory under the main project folder
$ zip -r src.zip src

You can also follow the platform-specific instructions below.

app-debug.apk

This is the output of building your app. Once you have built, it should be located under app/build/outputs/apk/debug/. See the platform-specific instructions for building below.

Do not submit an instant-run or other intermediate APK – we will not be able to run it, and you will get a zero! If you follow the instructions, you will submit the right APK.

phone.txt or tablet.txt

These should be text files that you create. You can use your favorite text editor to make these. For phone.txt, use phone as the content of the text file, and for tablet.txt, use tablet as the content.

If you are on MacOS, Linux, WSL, or Cygwin, you should be able to use the following commands in the terminal to create phone.txt or tablet.txt:

$ echo phone > phone.txt
$ echo tablet > tablet.txt

MacOS

src.zip

Open your project in Android Studio. At the top left, right click on src:

Select “Reveal in Finder”:

This will open up a Finder window, where you can see the src folder. Right click on it and select “Compress “src””:

You will now have the required src.zip in the current folder:

app-debug.apk

In Android Studio, click “Build” in the menu bar, then “Build Bundle(s) / APK(s)”, then “Build APK(s)”.

When building has successfully finished, a notification will pop up at the bottom right. Click on “locate”:

This will open up a Finder window in the folder that contains app-debug.apk:

Windows

src.zip

Open your project in Android Studio. At the top left, right click on src and select “Show in Explorer”:

This will open up an Explorer window, where you can see the src folder. Right click on it and select “Send to” and then “Compressed (zipped) folder”:

You will now have the required src.zip in the current folder. Explorer may not show the .zip extension, but the file does have it, and you can tell by the zipper on the icon as well as the type that it is a zip file:

app-debug.apk

In Android Studio, click “Build” in the menu bar, then “Build Bundle(s) / APK(s)”, then “Build APK(s)”.

When building has successfully finished, a notification will pop up at the bottom right. Click on “locate”:

This will open up an Explorer window in the folder that contains app-debug.apk:

Verifying the APK

You can open an APK from Android Studio to verify that it works. Select “Profile or debug APK” at the startup splash screen, or choose that from the File menu if you already have a project open. The result should look like the following:

If there is no res folder listed on the right, you do not have the correct APK.

You should also be able to hit the play button to install and run the APK on an emulated or physical device, and you can then verify that it runs correctly on the device.