Flutter_facebook_login: App crashes after adding flutter_facebook_login 2.0.0

Created on 5 Apr 2019  路  6Comments  路  Source: roughike/flutter_facebook_login

If I add the version 2.0.0 of flutter_facebook_login the app opens up and close immediately throwing an error app stopped working.. if I revert back to 1.2.0 the plugin works fine.

Launching lib\main.dart on SM C9000 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk

I have tried all the steps including cleaning, running flutter packages get etc. it also doesn't work in a new project as well. like with the base project flutter provides

Most helpful comment

In android/gradle.properties i added:

android.useAndroidX=true
android.enableJetifier=true

and stop to crash...

All 6 comments

see #114 for solution

I'm having this issue at this morning,
if the above doesn't work for you, here is my solution:

  1. In android/gradle.properties, remove the following line:
    org.gradle.jvmargs=-Xmx1536M
  2. flutter clean
  3. On the phone, remove the app
  4. Install/flutter run again

In android/gradle.properties i added:

android.useAndroidX=true
android.enableJetifier=true

and stop to crash...

For those that already had an AndroidX project setup, flutter clean (after manually nuking the build/ directory) seems to have stopped the crashing. I did not have to make any of the changes suggested by @timoteo7 or @crizant since they were already set in my project. It was just the cleanup that did the trick.

I currently use 2.0.1 then spend 2 days find out what wrong because there is no error message point to AndroidX at all, solution from @timoteo7 helped me a lot. I think we need it in README or installation guide.

First,u need to configure
strings.xml and AndroidManifest.xml
then,import again.
it will work.

Was this page helpful?
0 / 5 - 0 ratings