Closed aneebiqbal closed 6 months ago
The sdk has not been initialized, make sure to call facebooksdk.sdkinitialize() first. -Android. I have done all the steps accurately that they told us to do from npm and github docs but still when i start my app it wont start and shows me error without crashing my React-native android app. https://www.npmjs.com/package/react-native-fbsdk-next#installation https://github.com/thebergamo/react-native-fbsdk-next
Just installed the library react-native-fbsdk-next and run the android build
The SDK should be auto-initialized at the launch of the app.
<string name="facebook_app_id">xxxxxxxxxxxxxx</string> <string name="facebook_client_token">56789string>
manifest file <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
build gradle mavenCentral()
implementation 'com.facebook.android:facebook-login:4.30.0' pakage.json "react-native-fbsdk-next": "^12.1.0", "react-native": "^0.64.3",
System: OS: macOS 12.6.3 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 34.71 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: Not Found npm: 8.5.5 - /usr/local/bin/npm Watchman: 2023.04.03.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.12.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.16.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: ^0.64.3 => 0.64.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Having the same issue
https://github.com/thebergamo/react-native-fbsdk-next/issues/241#issuecomment-1114174678
https://github.com/thebergamo/react-native-fbsdk-next/issues/236#issuecomment-1111744717
i restarted my PC and it solved the issue dont know how.
🐛 Bug Report
The sdk has not been initialized, make sure to call facebooksdk.sdkinitialize() first. -Android. I have done all the steps accurately that they told us to do from npm and github docs but still when i start my app it wont start and shows me error without crashing my React-native android app. https://www.npmjs.com/package/react-native-fbsdk-next#installation https://github.com/thebergamo/react-native-fbsdk-next
To Reproduce
Just installed the library react-native-fbsdk-next and run the android build
Expected Behavior
The SDK should be auto-initialized at the launch of the app.
Code Example
manifest file <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
build gradle mavenCentral()
Environment
System: OS: macOS 12.6.3 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 34.71 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: Not Found npm: 8.5.5 - /usr/local/bin/npm Watchman: 2023.04.03.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.12.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.16.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: ^0.64.3 => 0.64.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found