App crashes after adding flutter_facebook_login 2.0.0
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
see #114 for solution
I'm having this issue at this morning, if the above doesn't work for you, here is my solution:
- In
android/gradle.properties, remove the following line:org.gradle.jvmargs=-Xmx1536M -
flutter clean - On the phone, remove the app
- Install/
flutter runagain
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.