首页 > 解决方案 > TypeError:null 不是对象(评估 LoginManager.logInWithPermissions)

问题描述

  1. 我已经运行了 react-native link react-native-fbsdk

  2. 我还添加了依赖项,见下文:

        implementation fileTree(dir: "libs", include: ["*.jar"])
        implementation 'androidx.appcompat:appcompat:1.0.2'
        implementation 'com.facebook.react:react-native:+'
        implementation 'com.facebook.android:facebook-login:[5,6)' 

我仍然收到错误LoginManager.LogInWithPermissions不是函数

标签: javascriptreact-native

解决方案


一切 nau 都适用于 nativescript android-sdk

我认为这是 android studio 问题。我建议在 android studio 中使用 nativescript sdk 进行 react-native 开发

https://docs.nativescript.org/start/quick-setup


推荐阅读