Skip to content

[BUG]: Build fails due to missing Android SDK Build-Tools 34.0.0, API Level 35, and proxy-related Maven issues #5995

@ShankhanilSaha

Description

@ShankhanilSaha

Describe the bug

While setting up the Oppia Android project on both Windows and Linux, I encountered several build issues that seem related to missing dependencies or configuration defaults. Specifically:

The project requires Android SDK Build-Tools version 34.0.0 to build successfully.

It also requires Android 15.0 (API Level 35) to be installed.

Android Studio’s default proxy settings were causing Maven dependency resolution failures.

Additionally, mobile-install needs to be disabled in the Run/Debug configurations for the build to succeed.

Most of these issues appear to be environment-agnostic, except the proxy issue which may vary by system setup.

Steps To Reproduce

Clone the Oppia Android project.

Set up Android Studio on Windows or Linux.

Attempt to build the project using Bazel.

Observe build errors related to missing SDK build-tools, API level, or Maven download issues.

Disable mobile-install in Run/Debug configurations and try again — build succeeds.

Expected Behavior

The project should build successfully after following the setup instructions in the build guide, without requiring manual installation of missing SDK versions or configuration changes.

Screenshots/Videos

No response

What device/emulator are you using?

No response

Which Android version is your device/emulator running?

No response

Which version of the Oppia Android app are you using?

No response

Additional Context

Other Issues to note and fix in the wiki(macOS)

chmod +x "bazel-6.5.0-installer-darwin-arm64.sh"
./bazel-6.5.0-installer-darwin-arm64.sh --user
  • While running the chmod` command, I ran into an error:
""bazel-real” can’t be opened because its integrity cannot be verified.””. Run command `sudo spctl --master-disable` Which brings backs the option of "Anywhere" to  Privacy & Security 

I fixed this by going to Privacy & Security -> Allow applications from -> Anywhere then rerun the chmod command.

We should add this to the Bazel issues section.

  • In Step 4: Set up your environment, there are instructions to add ANDROID_HOME to path, without specifying the path. - Clarify android home path instructions to -> export ANDROID_HOME="$HOME/Library/Android/sdk"
  • Under Install oppia-android, there are 2 mentions of running bash setup.sh. Add information that an oppia-android-tools folder will be created inside the opensource directory when this command succeeds.
  • Under "Configure your Android Studio", Add a screenshot that adds more clarity to the instruction: Also, navigate to the "SDK Tools" tab, click the "Show Package Details" checkbox at the bottom right, then click on "Android SDK Build-Tools 34-rc1" and select 32.0.0 (this is needed for Bazel support). (NB this should also be updated to 34 instead of 32.0.0)
  • In the the Bazel issues section, No. 3: "Accept the Xcode licence: sudo xcodebuild -licence", fix spelling of license.

Metadata

Metadata

Labels

Impact: MediumModerate perceived user impact (non-blocking bugs and general improvements).Work: LowSolution is clear and broken into good-first-issue-sized chunks.bugEnd user-perceivable behaviors which are not desirable.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions