Skip to content

Commit 00aec63

Browse files
committed
docs: Update AGENTS.md - Android builds are working
- Remove outdated 'Nuclear Reset' Android section - Document working build configuration (AGP 8.14.3, SDK 36) - Add emulator testing commands - Confirm Health Connect integration status
1 parent bb493f3 commit 00aec63

1 file changed

Lines changed: 42 additions & 33 deletions

File tree

AGENTS.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -270,57 +270,66 @@ const SLEEP_BREATHING_REGULARITY = 0.85;
270270

271271
## Android Build
272272

273-
### Current Status: REMOVED (Nuclear Reset)
273+
### Current Status: WORKING
274274

275-
**WARNING**: As of January 12, 2026, the Android-specific code has been REMOVED from this codebase due to intractable build issues. The web app is the primary platform.
275+
Android builds are functional as of January 2026. The previous AGP/Material compatibility issues have been resolved.
276276

277-
### CRITICAL: NEVER Propose EAS Cloud Builds
277+
### Build Commands
278278

279-
**DO NOT suggest EAS cloud builds as a solution.** Cloud builds will NOT work if we cannot get the build working locally. This has been attempted and failed. The root cause is a fundamental incompatibility between:
279+
```bash
280+
# Build and run on connected device/emulator
281+
npx expo run:android
280282

281-
- React Native 0.81+ / Expo SDK 54+
282-
- react-native-screens 4.19+
283-
- Material Components 1.13.0
284-
- Android Gradle Plugin AAPT2 resource compiler
283+
# Build APK only
284+
cd android && ./gradlew assembleDebug
285285

286-
### Historical Context (Pre-Reset)
286+
# APK output location
287+
android/app/build/outputs/apk/debug/app-debug.apk
288+
```
287289

288-
Android builds were blocked by a bug in Android Gradle Plugin's AAPT2 resource compiler that fails to parse color resources from Material library.
290+
### Build Configuration
289291

290-
**Error:**
292+
| Component | Version |
293+
| ---------- | ------------- |
294+
| buildTools | 36.0.0 |
295+
| minSdk | 26 |
296+
| compileSdk | 36 |
297+
| targetSdk | 36 |
298+
| NDK | 27.1.12297006 |
299+
| Kotlin | 2.1.20 |
300+
| Gradle | 8.14.3 |
291301

292-
```
293-
material-1.13.0/res/values/values.xml:364:4: Invalid <color> for given resource value.
294-
java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource
295-
```
302+
### Health Connect Integration
296303

297-
**Root Cause**: Health Connect integration (`expo-health-connect`, `react-native-health-connect`) required `react-native-screens@4.19.0` which depends on Material 1.13.0. Material 1.13.0 uses M3 Design Tokens with `<macro>` XML tags that AGP's AAPT2 cannot parse.
304+
Health Connect is integrated and working:
298305

299-
### AGP Versions Tested (All Failed)
306+
- Permissions: Heart rate, respiratory rate, sleep data
307+
- Status shown in Settings > Wearables & Health Connect
308+
- Debug data available in Settings > Health Connect Data Debug
300309

301-
| AGP | Gradle | Material | Result |
302-
| ------------- | ------ | --------- | --------------------------------- |
303-
| 8.7.3 | 8.13 | 1.13.0 | Version mismatch |
304-
| 8.10.2 | 8.13 | 1.9.0 | Missing react-native-screens APIs |
305-
| 8.10.2 | 8.13 | 1.10-1.12 | Invalid color error |
306-
| 8.11.0 | 8.14.3 | 1.13.0 | Invalid color error |
307-
| 8.13.0-8.13.2 | 8.13 | 1.12.0 | Invalid color error |
310+
### Testing on Emulator
308311

309-
### Future Android Implementation
312+
```bash
313+
# List available emulators
314+
~/Library/Android/sdk/emulator/emulator -list-avds
315+
316+
# Start emulator
317+
~/Library/Android/sdk/emulator/emulator -avd Medium_Phone_API_35
310318

311-
When rebuilding Android support:
319+
# Check connected devices
320+
~/Library/Android/sdk/platform-tools/adb devices
312321

313-
1. Start from a working web-only codebase
314-
2. Use `npx expo prebuild --platform android` to generate fresh native files
315-
3. Add native features ONE AT A TIME, testing build after each
316-
4. Avoid Health Connect until the AGP/Material bug is resolved upstream
317-
5. Test build locally BEFORE committing any native changes
322+
# Install APK
323+
~/Library/Android/sdk/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk
324+
325+
# Take screenshot
326+
~/Library/Android/sdk/platform-tools/adb exec-out screencap -p > screenshot.png
327+
```
318328

319-
### EAS Configuration (Reference Only)
329+
### EAS Configuration
320330

321331
- Project ID: `8d6aab43-b375-4a93-86a2-bb5d4e407871`
322332
- Owner: `contextlab`
323-
- **DO NOT USE** until local builds work first
324333

325334
---
326335

0 commit comments

Comments
 (0)