Home > Enterprise >  Failed to list versions for com.facebook.android:facebook-login -Facebook login issue
Failed to list versions for com.facebook.android:facebook-login -Facebook login issue

Time:11-01

My project was working fine till tomorrow now I'm getting this error in my all projects which have facebookLogin.

  • pubspac.yaml
flutter_login_facebook: ^1.6.0
  • compileSdkVersion

      compileSdkVersion 33
    
  • minSdkVersion

     minSdkVersion 20
    
  • repositories

     repositories {
              google()
              mavenCentral()
          }
    
  • dependencies

    dependencies {
          implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
          implementation platform('com.google.firebase:firebase-bom:29.2.1')
          implementation 'com.google.firebase:firebase-analytics-ktx'
          implementation 'com.facebook.android:facebook-login:latest.release'
      }
    

I'm facing the below error.

* 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-login:latest.release.
     Required by:
         project :app
      > Failed to list versions for com.facebook.android:facebook-login.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml'.
               > Read timed out

CodePudding user response:

In /android/app/build.gradle, within dependencies, change this line

implementation 'com.facebook.android:facebook-login:latest.release'

to

implementation 'com.facebook.android:facebook-login:15.0.2'

This works for me and I can successfully login with facebook.

You might also need to run a "flutter clean" command before building.

Please note! I'm using flutter_facebook_auth (^5.0.0 2) instead of flutter_login_facebook.

Update! They just released version 1.6.2 of flutter_login_facebook which addresses your issue, so doing a "flutter pub upgrade" should resolve it.

CodePudding user response:

Try to change to implementation 'com.facebook.android:facebook-login:12.3.0

  • Related