KotlinCS 124 LogoJava

Index

Installation

Claude

Android Studio

Git

Effort Logging

Using Android Studio

This guide covers troubleshooting common Android Studio problems you may encounter while working on the CS 124 independent project. You should complete the installation guide first before proceeding with these steps.

Debugging Android Studio Problems
Debugging Android Studio Problems

Android Studio can be a finicky beast. Sometimes it can get into states where something that should be working isn’t. For example, an import that should be available shows up as highlighted in red and unavailable. I’ve encountered a wide range of strange errors when using this tool over the years.

Here are a few steps that sometimes work that we’d suggest taking before you ask for support:

  1. Wait a few minutes. Android Studio is frequently performing background tasks like indexing files, downloading dependencies, or building the project. Often just letting it finish what it’s doing will resolve the issue. Look for progress indicators at the bottom of the window.
  2. Restart Android Studio. Sometimes just giving it a chance to reload the project is all that’s required.
  3. Sync Project with Gradle Files. Reloading the project configuration can resolve many issues.
  4. Invalidate Caches… This is the slowest of these options, but is sometimes required to get Android Studio back into a working state.

If none of these work, please seek help from a course tutor. At times completely uninstalling Android Studio and reinstalling is also successful, but that’s a slow process and not something you should try before at least talking to a tutor.

Checking Your Gradle Home Directory
Checking Your Gradle Home Directory

Gradle is the build system used to build Android projects. It’s responsible for downloading required dependencies, building the app, and running tests.

At times, Gradle’s internal data can get corrupted, and you may need to remove the directory where it stores data locally to allow it to recover. The following video shows how to identify the Gradle home directory, ensure that it is properly located, and remove it if necessary.