You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Claude Code cloud sessions currently cannot build this project locally — changes are only verified by opening a PR so GitHub Actions runs (that's how #136 was verified). Three gaps, observed in a real session (2026-07-12):
Network egress policy blocks the Gradle distribution. The wrapper fetches gradle-9.5.1-bin.zip from services.gradle.org, which redirects to a GitHub release asset (github.com/gradle/gradle-distributions/releases/...) — the proxy returns 403 for that host.
The container ships JDK 21 (Ubuntu 24.04 default), but app/build.gradle sets sourceCompatibility/targetCompatibility = Java 25 — same reason CI installs Temurin 25 explicitly.
No Android SDK in the container (no ANDROID_HOME, no platforms/build-tools).
Fix — three steps, all in one environment-settings dialog
Where to change it (exact navigation)
There is no separate "Environments" page — everything lives in one dialog:
Go to claude.ai/code.
Click the cloud icon showing the current environment's name to open the environment selector.
Hover over the environment used for this repo's sessions and click the settings (gear) icon that appears on its right.
The edit dialog contains all three fields used below: Network access, Environment variables (.env format), and Setup script.
Changing allowed domains or the setup script rebuilds the cached environment snapshot — the next session start re-runs setup once, then later sessions reuse the snapshot.
The default Trusted level already includes services.gradle.org, plugins.gradle.org, repo.maven.apache.org, github.com, objects.githubusercontent.com, and release-assets.githubusercontent.com — i.e. everything Gradle itself needs. What's missing for an Android build is only Google's SDK/Maven host and Adoptium (for JDK 25).
In the Network access selector choose Custom, keep the Trusted defaults included, and add these three lines to Allowed domains:
dl.google.com
maven.google.com
api.adoptium.net
⚠️ Check the current level while in the dialog: the 2026-07-12 session got 403 on github.com release assets even though that host is in the Trusted defaults, which suggests the environment is currently on a stricter setting (not Trusted). "Custom + include defaults + the three domains above" fixes both problems at once.
Step 2: JDK 25
Either install Temurin 25 in the setup script and export JAVA_HOME, or (nicer, helps every contributor) adopt Gradle toolchains in the repo:
// settings.gradle
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
Plus ANDROID_HOME=/root/android-sdk (setup scripts run as root) in the Environment variables field. platforms;android-36 matches compileSdk = 36; AGP fetches matching build-tools automatically. Alternatively write sdk.dir into local.properties from the setup script.
A fresh Claude Code cloud session can run ./gradlew test and ./gradlew assembleDebug successfully
Setup is scripted in the environment config (no manual per-session steps)
Decision recorded: Gradle toolchain in-repo vs. setup-script JDK
Notes
CI (android-ci.yml) stays the source of truth for PR verification; this is about faster in-session iteration (build, lint, unit tests) before a PR exists.
Problem
Claude Code cloud sessions currently cannot build this project locally — changes are only verified by opening a PR so GitHub Actions runs (that's how #136 was verified). Three gaps, observed in a real session (2026-07-12):
gradle-9.5.1-bin.zipfromservices.gradle.org, which redirects to a GitHub release asset (github.com/gradle/gradle-distributions/releases/...) — the proxy returns 403 for that host.app/build.gradlesetssourceCompatibility/targetCompatibility= Java 25 — same reason CI installs Temurin 25 explicitly.ANDROID_HOME, no platforms/build-tools).Fix — three steps, all in one environment-settings dialog
Where to change it (exact navigation)
There is no separate "Environments" page — everything lives in one dialog:
.envformat), and Setup script.Docs: https://code.claude.com/docs/en/claude-code-on-the-web
Step 1: Network allowlist
The default Trusted level already includes
services.gradle.org,plugins.gradle.org,repo.maven.apache.org,github.com,objects.githubusercontent.com, andrelease-assets.githubusercontent.com— i.e. everything Gradle itself needs. What's missing for an Android build is only Google's SDK/Maven host and Adoptium (for JDK 25).In the Network access selector choose Custom, keep the Trusted defaults included, and add these three lines to Allowed domains:
github.comrelease assets even though that host is in the Trusted defaults, which suggests the environment is currently on a stricter setting (not Trusted). "Custom + include defaults + the three domains above" fixes both problems at once.Step 2: JDK 25
Either install Temurin 25 in the setup script and export
JAVA_HOME, or (nicer, helps every contributor) adopt Gradle toolchains in the repo:With the toolchain approach Gradle auto-provisions JDK 25 regardless of the launcher JVM (still needs
api.adoptium.netfrom Step 1).Step 3: Android SDK (Setup script field)
Plus
ANDROID_HOME=/root/android-sdk(setup scripts run as root) in the Environment variables field.platforms;android-36matchescompileSdk = 36; AGP fetches matching build-tools automatically. Alternatively writesdk.dirintolocal.propertiesfrom the setup script.Plan
./gradlew test assembleDebugmust pass), then save it into the environment config.Installationsection ofREADME.md#3).Acceptance criteria
./gradlew testand./gradlew assembleDebugsuccessfullyNotes
android-ci.yml) stays the source of truth for PR verification; this is about faster in-session iteration (build, lint, unit tests) before a PR exists.