statsig-io / react-native-expo

Statsig SDK for usage in React Native with Expo
ISC License
5 stars 2 forks source link

Build fails for Android on the latest expo SDK #6

Closed matteo-hertel closed 6 months ago

matteo-hertel commented 1 year ago

Thank you for supporting expo, makes using statsig really easy!

When using the lastest Expo SDK (v48) and installing statsig-react-native-expo building the app fails with the following error:

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
[stderr] 
The following dependencies do not satisfy the required version:
[stderr] 
project ':expo-device' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

after a bit of digging the issue is down to the expo-device package, updating it to version ~5.2.1 fixes the build, there are also other dependencies that are outdated, and would be great to release a new version with this package with all the updated dep

I'd create a PR myself but I'm not sure about the workflow and if is as simple as bumping the dependency up and merging it

If anybody else is facing this same problem, installing "expo-device": "~5.2.1", as a dependency of the react native project mostly fixes the problem, it builds as the direct dependencies are favoured in the dependency tree resolution but could lead to subtle bugs hard to track down

tore-statsig commented 1 year ago

Thanks for the detailed report - we would welcome a PR if you have one, but we would still run tests before bumping the package and publishing a new version. If not we can take a pass at updating dependency versions tomorrow

tore-statsig commented 6 months ago

We've updated dependencies in https://github.com/statsig-io/react-native-expo/releases/tag/v4.7.0 - it is unclear if this still applies. Closing, please reopen if you are still blocked