0

After upgrading from React-Native 0.59.10 to 0.62.2 I receive this error when running the Android app, the IOS app runs without any issues. I found out Fresco is connected to Flipper but I do not understand how to fix this.

In my MainApplication.java file I have no reference to Flipper or Freso (I tried checking this file for duplicate imports. The only reference to Flipper I have in mainapplication.java is the initializeFlipper part on the bottom of the file (as instructed in the upgrade manual).

Unfortunately because I have no understanding where this is coming from I really have no clue of to which code snippets to include to help solve this error message. If anyone could help me with this, and telling what files/code is relevant here please do!

enter image description here

EDIT: Below is the android/app/build.grade file

dependencies {
    implementation project(':react-native-fbsdk')
    implementation project(':react-native-firebase')
    implementation project(':react-native-google-signin')
    implementation project(':react-native-image-crop-picker')
    implementation project(':react-native-maps')
    implementation project(':react-native-screens')
    implementation project(':react-native-reanimated')
    implementation project(':react-native-gesture-handler')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'com.facebook.android:facebook-core:5.0.0' 
    implementation "com.facebook.react:react-native:+"  // From node_modules
        implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
      exclude group:'com.facebook.fbjni'
    }
MarkT
  • 97
  • 1
  • 11

1 Answers1

0

It's an auto-linking issue make sure to unlink any package that uses fresco

for reference default android/app/build.gradle

enter image description here

Anwar Gul
  • 665
  • 4
  • 15
  • Thank you Anwar Gul. Is there something to find out which package uses Fresco? Or should I start removing packages line by line to see if it works? Also is removing the dependencies { implementation project line enough, or should I als run the command react-native unlink package name? – MarkT May 22 '20 at 05:14
  • Fresco is usually used for image related packages so you can check them first if using any. Second it is better to run react-native unlink package name then manually removing packages – Anwar Gul May 22 '20 at 20:46
  • 1
    Thanks Anwar I got it working now! I manually unlinked every package and commented out the package list in the MainApplication.java file. When starting the app I then got a few error messages about missing packages. I re-added these and now the app is running again. – MarkT May 23 '20 at 05:56