Home > front end >  > Task :app:checkReleaseAarMetadata FAILED - React native
> Task :app:checkReleaseAarMetadata FAILED - React native

Time:05-10

I am making a release build for my project using ./gradlew assembleRelease command but it gives me this error.

> Task :app:checkReleaseAarMetadata FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve com.facebook.android:facebook-android-sdk:[8,9).
     Required by:
         project :app
      > 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)

my build.gradle

  ext {
    buildToolsVersion = "29.0.3"
    minSdkVersion = 21
    compileSdkVersion = 30
    targetSdkVersion = 30
    ndkVersion = "20.1.5948944"
    googlePlayServicesAuthVersion = "16.0.1"
}

CodePudding user response:

To solve this issue just change the compileSdkVersion in your build.gradle file.

Open android > build.gradle file. Change compileSdkVersion from 29 to 30. Change targetSdkVersion from 29 to 30. now run again.

CodePudding user response:

To solve this issue just add mavenCentral() in repositories of your project build.gradle. Refer to https://developers.facebook.com/docs/android/getting-started/

  • Related