Facebook login crash on Android. FB.Login

In the editor, this code with other functions added run perfectly and I can set scores and other useful things. But even running this barebones login crashes on android.

Facebook will initialize, but instantly crash when loginFunction is called.

Unity 5.6.x, Facebook SDK 7.9.4, Android build facebook setting match in the editor and in dev/facebook.

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | openssl sha1 -binary | openssl base64

^^^ gives me a matching key to what I have in editor and on dev/fb

What am I missing?

Did u ever solve your problem?

I got this problem today. This is how i fix this:

Ctrl + Shift + B. Then switch build system from Gradle → Internal → Gradle.

I think it trigger Facebook background resolver or reimport something.

This work for me. Hope it work for someone too.