Flutter_facebook_login: AndroidX Support

Created on 27 Jan 2019  路  13Comments  路  Source: roughike/flutter_facebook_login

Google has updates all their flutter dependencies, what causes to migrate to AndroidX libs.
Unfortunately this plugin crashes after migration.

landed on master

Most helpful comment

Version 2.0.0 is now on pub - thanks everyone for helping!

All 13 comments

please update it to support AndroidX

This is a must. Thank you dev!

Build fails. +1

There is an open pull request for that. Hopefully will be merged in the near future:
https://github.com/roughike/flutter_facebook_login/pull/87

+1

Please provide AndroidX Support ASAP. Thanks!

Any update dev?

A fix for this is now landed on master, but not on Pub just yet.

I decided to go with merging #96, as that one was close to how the official Flutter plugins were migrated to AndroidX. Seems like that approach also works better for libraries that doesn't have AndroidX support just yet.

I would love people to test this and verify that it works for you too. If everything is fine, I'll make a new major release on Pub in a couple days. Follow these instructions to migrate your Flutter app to AndroidX and then include the AndroidX -compatible flutter_facebook_login like this:

dependencies:
  ...
  flutter_facebook_login:
    git:
      url: https://github.com/roughike/flutter_facebook_login
      ref: '79ff08a'

@roughike just one data point, but it works for me.

testInstrumentationRunner should also be changed to the androidx one:
https://github.com/roughike/flutter_facebook_login/blob/master/android/build.gradle#L29

    defaultConfig {
        minSdkVersion 16
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

@xqwzts Good catch! Although it shouldn't affect production code, it shows up in the Migrate to AndroidX... dialog when migrating a project to AndroidX, which shouldn't happen.

Here's the latest version that has the correct testInstrumentationRunner dependency:

dependencies:
  ...
  flutter_facebook_login:
    git:
      url: https://github.com/roughike/flutter_facebook_login
      ref: '79ff08a'

Version 2.0.0 is now on pub - thanks everyone for helping!

Version 2.0.0 is now on pub - thanks everyone for helping!

Thanks a lot!!! I hope you can do the same for your twitter login package as well.

Was this page helpful?
0 / 5 - 0 ratings