Android build on EAS fails: resource android:attr/lStar not found

FIXED: upgrade: "@react-native-community/netinfo": "6.0.2" but it’s strange that an older EAS build from a tag which previously built failed with thte same error.

We have an expo app and being building it on EAS for a couple of weeks. Our latest build fails for Android with the following error:

802 actionable tasks: 802 executed
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseResources'.
[stderr] > A failure occurred while executing$ActionFacade
[stderr]    > Android resource linking failed
[stderr]      /root/.gradle/caches/transforms-2/files-2.1/d3fbc213afb2d128c25178510ae1dfad/core-1.7.0-alpha02/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at
[stderr] BUILD FAILED in 3m 57s
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

The app runs normally locally (using Expo Go, on iOS and Android).

To be sure it’s not something specific to the code we recently commited in the app – we tried to build from a git tag which we currently have in production and which was built via EAS withour errors. That also fails with the same error.

So, in short, both the new version and a previous version (which was successfully build on EAS) fails to build with that same error ^.


Thanks for following up with the resolution, @tkrajina.

I think this hints at the reason:

I suppose the Expo build servers might have been updated to build for Android SDK 31, which is apparently incompatible with older versions of @react-native-community/netinfo :man_shrugging: