Open AlexxMart opened 5 years ago
This isn't a solution to the problem or a solution that'll work for everyone, but I suggest installing the SDK with cocoapods. react-native link
is so broken, it does more harm than good. Delete project_root/ios/[Podfile.lock, Pods], add pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
to your target's body section, run pod install
, run "clean build folder" with xcode, and try to build the project. You might progress forward to untangling dependencies... GOOD LUCK!!!
I have the same issue, in my case with android, I have make link step according to https://github.com/facebook/react-native-fbsdk#31-android but I have not able to run my project, may somebody help me?
I had this problem too - I was able to fix it by adding this to the dependencies line in android/app/build.gradle:
implementation project(':react-native-fbsdk')
Hope it helps you.
Hello @slimethefrozen, I tried that and unfortunately, it didn't work. Also, @kessler9, I tried that as well but with no luck
@AlexxMart can you show me your error? I might have seen it before. I can't promise anything but I'd love to put you out of your misery if I've seen the error before.
Sorry that didn't help - worked for me, but I guess you have a different issue.
I found the differences by making a simple FBSDK project, and then comparing the gradle files and package.json - just make sure your new test project is using the same RN version as the project with the error.
@slimethefrozen Sorry it took a few days for me to read this. I will create a new RN project (react-native: 0.59.9) with the latest FBSDK version to see if it works there and compare the Gradle Files
Sure thing @kessler9 I will reproduce the error and see what comes up after trying the suggestion made by @slimethefrozen to see if it works or anything changes
Im using rn 0.60 and I added:
implementation project(':react-native-fbsdk')
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
and in settings.gradle
include ':react-native-fbsdk'
project(':react-native-fbsdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fbsdk/android')
In package.json: "react-native-fbsdk": "^1.0.1"
And it seems that the instance new FBSDKPackage is not longer using mCallbackManager, in fact is being add it with auto link in packagelist
🐛 Bug Report
I am trying to use the version "react-native-fbsdk": "^0.10.1" in a React Native "0.59.9" project. I've followed the steps the FBSDK Repo and FB Getting Started Guide but when I run the
react-native run-android
I get the following error:I have already ran
react-native link
Expected Behavior
According to the documentation, I should be able to run the project at this point
Code Example
This is my MainApplication.java
Environment
React Native Environment Info: System: OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver) CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz Memory: 226.26 MB / 11.61 GB Shell: 5.4.2 - /usr/bin/zsh Binaries: Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node Yarn: 1.17.3 - /usr/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.15.1/bin/npm SDKs: Android SDK: API Levels: 23, 26, 28 Build Tools: 27.0.3, 28.0.3 System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.9 => 0.59.9 npmGlobalPackages: react-native-cli: 2.0.1