Problem
app/androidApp/build.gradle.kts hard-codes:
```kotlin
buildConfigField("String", "BACKEND_BASE_URL", "\"http://10.0.2.2:8000\\\"\")
```
10.0.2.2 is the Android emulator loopback to host. On a physical device it isn't routable to the dev machine. Every contributor hits this on first run.
Workaround (currently in README)
For physical device + USB:
```
adb reverse tcp:8000 tcp:8000
```
…and edit the buildConfigField to localhost:8000 before installing. Edit isn't documented.
For LAN: use host machine's LAN IP and ensure backend binds with --host 0.0.0.0 (now in README).
Proposed fix
Make it a Gradle property with a sensible default:
```kotlin
val backendUrl = (project.findProperty("backendUrl") as? String) ?: "http://10.0.2.2:8000\"
buildConfigField("String", "BACKEND_BASE_URL", "\"$backendUrl\"")
```
Then: ./gradlew installDebug -PbackendUrl=http://localhost:8000 for physical device, or -PbackendUrl=http://192.168.x.x:8000 for LAN.
Document both modes in README.
Caught by
PR #4 rebase validation — physical device couldn't reach backend until I patched this locally.
Problem
app/androidApp/build.gradle.ktshard-codes:```kotlin
buildConfigField("String", "BACKEND_BASE_URL", "\"http://10.0.2.2:8000\\\"\")
```
10.0.2.2is the Android emulator loopback to host. On a physical device it isn't routable to the dev machine. Every contributor hits this on first run.Workaround (currently in README)
For physical device + USB:
```
adb reverse tcp:8000 tcp:8000
```
…and edit the buildConfigField to
localhost:8000before installing. Edit isn't documented.For LAN: use host machine's LAN IP and ensure backend binds with
--host 0.0.0.0(now in README).Proposed fix
Make it a Gradle property with a sensible default:
```kotlin
val backendUrl = (project.findProperty("backendUrl") as? String) ?: "http://10.0.2.2:8000\"
buildConfigField("String", "BACKEND_BASE_URL", "\"$backendUrl\"")
```
Then:
./gradlew installDebug -PbackendUrl=http://localhost:8000for physical device, or-PbackendUrl=http://192.168.x.x:8000for LAN.Document both modes in README.
Caught by
PR #4 rebase validation — physical device couldn't reach backend until I patched this locally.