We are trying to update React Native to version 0.73
with "expo": "50.0.3". But we get this error:
Could not determine the dependencies of task ':expo-modules-core:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':expo-modules-core:debugCompileClasspath'.
> Could not resolve com.facebook.fbjni:fbjni:0.5.1.
Required by:
project :expo-modules-core
> Cannot find a version of 'com.facebook.fbjni:fbjni' that satisfies the version constraints:
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:0.5.1'
Constraint path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:{strictly 0.3.0}' because of the following reason: debugRuntimeClasspath uses version 0.3.0
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.react:react-android:0.72.6' (debugVariantDefaultApiPublication) --> 'com.facebook.fbjni:fbjni:0.3.0'
> Could not resolve com.facebook.fbjni:fbjni:{strictly 0.3.0}.
Required by:
project :expo-modules-core
> Cannot find a version of 'com.facebook.fbjni:fbjni' that satisfies the version constraints:
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:0.5.1'
Constraint path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:{strictly 0.3.0}' because of the following reason: debugRuntimeClasspath uses version 0.3.0
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.react:react-android:0.72.6' (debugVariantDefaultApiPublication) --> 'com.facebook.fbjni:fbjni:0.3.0'
> Could not resolve com.facebook.fbjni:fbjni:0.3.0.
Required by:
project :expo-modules-core > com.facebook.react:react-android:0.72.6
> Cannot find a version of 'com.facebook.fbjni:fbjni' that satisfies the version constraints:
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:0.5.1'
Constraint path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.fbjni:fbjni:{strictly 0.3.0}' because of the following reason: debugRuntimeClasspath uses version 0.3.0
Dependency path 'host.exp.exponent:expo-modules-core:1.11.8' --> 'com.facebook.react:react-android:0.72.6' (debugVariantDefaultApiPublication) --> 'com.facebook.fbjni:fbjni:0.3.0'
I have somehow fix this by patching expo-modules-core
android/build.gradle
file like this:
dependencies {
...
implementation 'com.facebook.react:react-android'
compileOnly 'com.facebook.fbjni:fbjni:0.5.1'
implementation("com.facebook.fbjni:fbjni:0.5.1") <- added this line
But it is somehow tricky and doesn’t seem like the correct solution to me 🤷♀️. Does anybody have the same problem?
Also no issue was found in the expo repo: https://github.com/expo/expo/issues.
2
Answers
I think you have a dependency conflict, you should try to run
npx expo-doctor
Maybe expo-modules-core version is not correct for your expo and react-native version
The only way I could fix this issue was by downgrading
expo
to version49.0.22
. I am running react-native version0.72.10
.