-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Description
All Android build jobs (build_android_apk, build_android_tv_apk, google_play) are failing during :app:compileReleaseKotlin with the following error:
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 2.0.0.
The error originates from play-services-cast-framework-22.3.0-api.jar, which is pulled in transitively by the react-native-google-cast dependency (^4.9.1). Google has updated play-services-cast-framework to version 22.3.0 which was compiled with Kotlin 2.2.0, but the project's Kotlin compiler version (bundled with Expo SDK 52 / React Native 0.76 / Gradle 8.10.2) is 2.0.x and cannot read the newer metadata format.
Affected workflows
build_android_apk.ymlbuild_android_tv_apk.ymlgoogle_play.yml
How to reproduce
Trigger a build from any downstream branded app repo (e.g. cust-app-xrtube). All Android jobs fail at the Gradle compile step.
Build log excerpt
e: jetified-play-services-cast-framework-22.3.0-api.jar!/META-INF/...kotlin_module
Module was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 2.2.0, expected version is 2.0.0.
> Task :app:compileReleaseKotlin FAILED
Suggested fix
Either:
- Pin
play-services-cast-frameworkto a compatible version by adding a Gradle resolution strategy inapp/build.gradle(e.g. force version 21.x that was compiled with Kotlin 2.0.x), or - Upgrade the Kotlin version to 2.2.x via
expo-build-properties(which may require broader Expo/React Native upgrades), or - Add a dependency constraint in the Expo build properties plugin to cap the cast framework version