1

我正在通过这个库使用 react-native facebook 登录:react-native-fbsdk。遵循安装指南并没有完全让它工作,但我设法在本机端修改后让它工作,正如许多 github 问题等中所指示的那样。

无论如何,两周前它运行良好,但现在,当我尝试使用 facebook 登录时,应用程序立即崩溃。它不会打开任何登录页面或做任何其他事情。

奇怪的是,如果我在模拟器中打开浏览器,将其保留在后台,然后尝试登录,登录会更进一步(我可以实际登录,但是当我被引导回来时,应用程序崩溃)。

从墓碑文件中,我可以获得以下警告/消息:

  1. 预期本机库版本号“”,实际本机库版本号“”

  2. 十这样的:

找不到为类 com.facebook.reactnative.androidsdk.FBLoginButtonManager 生成的设置器

我该如何解决这个问题?为什么它不再起作用了?我没有更改代码中的任何内容。我唯一能想到的是它在编译应用程序期间从互联网加载了一些东西。不然怎么会失败?

4

1 回答 1

0

This is answer for how I solved the problem, not that much about why it was behaving like this.

In short:

I got it working again by updating the emulator and android API 6.0 through Android Studio.

<Rant state='begin'>

I have no idea why this worked, nor why did it broke in the first place. As it was working good with the old emulator and API 6.0 earlier.

It seems like the react-native fbsdk is far from stable. Or then it is completely react-native's fault, idk to be honest. But this just makes me want to develop fully native, instead of react-native, which seems unstable from my experience so far.

<Rant state='end'>
于 2017-08-27T10:20:16.910 回答