Reputation: 1374
I'm using expo sdk 45 platform: Android. Once I built the app this error prompt, I've tried upgrading and downgrading 'expo-updates' since the error is occuring at 'Android -> node-modules' but nothing came of it. Any suggestion will be helpful.
Upvotes: 4
Views: 8870
Reputation: 627
This is happening because all the templates reference the React Native dependency by range, like implementation 'com.facebook.react:react-native:+'.
Usually this dependency gets resolved from the local Maven repo in ./node_modules/react-native/android but since it has been published to Maven Central it's now grabbing the very latest RC.
You can resolve this problem by forcing the React Native dependency to the version you expect with something like this implementation 'com.facebook.react:react-native:0.68.2!!'
in /android/app/build.gradle
. The !!
is shorthand for restricting Gradle from upgrading if your project or its transitive dependencies depend on a newer version.
Thanks to jaredh from GitHub.
issue: link
Upvotes: 0
Reputation: 475
My problem was that I accidentally did yarn add expo-updates
, instead of expo install expo-updates
, resulting in the wrong version being locked.
Doing expo install expo-updates
installed and locked the correct version. Maybe this will help someone.
Upvotes: 1
Reputation: 1374
Try upgrading to expo-updates@~0.14.4
, not sure if will work for anyone else though. Heads up expo doctor will downgrade this to expo-updates@~0.13.4
on sdk ^45.0.0
Upvotes: 0
Reputation: 51
I fixed this problem im my project:
now is solved
Upvotes: 5
Reputation: 283
Try building the app with ./gradlew app:assembleRelease
instead of ./gradlew assembleRelease
Upvotes: 1