Jam
Jam

Reputation: 117

React Native suddenly throwing May 09 2022

I am currently working on a React Native project that has been previously worked on by other devs. it was compiling fine as before May 09 2022 then I tried to compile it now and it's now throwing

BUILD FAILED in 41s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.
    > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
       > Could not resolve com.facebook.android:facebook-android-sdk:9.0.+.
         Required by:
             project :app > project :react-native-fbsdk-next
          > Failed to list versions for com.facebook.android:facebook-android-sdk.
             > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
                > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
                   > org.apache.http.client.ClientProtocolException (no error message)

No new packages were added, I even tried to revert to old commits just to confirm if it's package related and it still threw this error. Was there any changes or update with Maven recently? I have other devs that are on Mac and theirs seem to be compiling just fine

Upvotes: 0

Views: 210

Answers (1)

Mono
Mono

Reputation: 26

I am not an expert in react native, I only started using it and I also have the same issue from 9th may 2022. But I am able to fixed it.

You can follow the below steps and may be it will work for you too.

Open this file node_modules/react-native-fbsdk-next/android/build.gradle and change Line no 48 with below line

def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '9.0.0')

Upvotes: 1

Related Questions