A4 Setup (Java/Android)

This assignment must be completed using Android Studio 3.2.1 (built-in Java 8).

1a/ Android Studio 3.2.1 Setup

Android Studio comes with the Java JDK and Android SDK preinstalled. Setting up your project just involves creating an empty project.

Installing Android Studio

Download and install Android Studio from the Android Developer Portal.

Creating an Empty Project

  1. Launch Android Studio, "Start a new Android Studio project".
  2. Walk through the project setup wizard, filling in values:
    • Application Name: Fotag (WatID)
    • Company name: (watid).example.com
    • Project location: (git folder)/assignments/a4
    • Phone and Tablet: API 26: Android 8.0 (Oreo)
    • Add an activity: your choice (but Empty might be a good start!)
  3. Build the project once and wait for it to complete before proceeding.

2/ Creating an AVD

This step describes setting up the AVD for testing.
  1. In Android Studio, click Tools, AVD manager.
  2. Click "Create new Virtual Device".
  3. Select "Phone", "Pixel" and click Next.
  4. Under the "Recommended" tab, click "Download" beside "Oreo" (API 26).
  5. Accept the terms of agreement, hit "Next".
  6. The API will install. Once the installation has finished, click "Finish".
  7. Select "Oreo", click "Next".
  8. Name your AVD "Pixel API 26" and click "Finish". If you get a popup saying that Instant Run requires an APK installation, click "Install and Continue".
  9. Accept the terms and agreement and click "Next".
  10. Once the installation has finished, click "Finish".

3/ Generating an APK

This step describes building the APK to submit in Git.

  1. Once you have finished the assignment, go to BUILD -> BUILD APK(s).
  2. Your APK should now be in your app/build/outputs/apk/debug folder (the file is called app-debug.spk by default).
  3. Copy this .apk file to the top-level of your assignments/a4 folder in your repository, before you commit and push your changes.