Open mahiraltinkaya opened 4 years ago
I crashes at my project too
@mahiraltinkaya you are not linking the module correctly. Try manual linking the library on Android, everything is mention in the README file of the repository. If you are using react-native version 0.60+ no need to manually link the module. I am assuming you have already configured your facebook app on https://developer.facebook.com/
@mahiraltinkaya you are not linking the module correctly. Try manual linking the library on Android, everything is mention in the README file of the repository. If you are using react-native version 0.60+ no need to manually link the module. I am assuming you have already configured your facebook app on https://developer.facebook.com/
I am using 0 62 version. I did not import to any page. When I just install it the application terminates and does not open. I can't do debug.
Faced the same issue
Facing the same issue
I am having the same problem, have you solved this?
I fixed my problem!
./gradlew clean
(use another command if you're at windows, google it!)
Go to android/app/build.gradle
and add:
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true // this line will fix
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
}
react-native start --reset-cache
react-native run-android
@luanccp
Awesome 😎✋
I face the same issue exactly like @mahiraltinkaya on mac with React Native 0.62.2
or above. The issue starts just after adding the yarn add react-native-fbsdk
without making any other changes to any file.
I already have multiDexEnabled
as true
before installing this package. I have tried solution by @luanccp but no luck.
I face the same issue exactly like @mahiraltinkaya on mac with React Native
0.62.2
or above. The issue starts just after adding theyarn add react-native-fbsdk
without making any other changes to any file. I already havemultiDexEnabled
astrue
before installing this package. I have tried solution by @luanccp but no luck.
On Xiomi devices, I can see the builds crash logs as follows: ` java.lang.NullPointerException: Attempt to invoke interface method 'int com.facebook.react.bridge.UIManager.addRootView(android.view.View, com.facebook.react.bridge.WritableMap, java.lang.String)' on a null object reference
`
I am using 0 62 version. I did not import to any page. When I just install it the application terminates and does not open. I can't do debug.
I had exactly the same problem as mentioned @mahiraltinkaya , the real issue behind it is setup of AndroidManifest.xml
and Strings.xml
properly.
So, make sure its done the right way.
In addition to this I had to install required version of NDK for android because I was facing
https://github.com/gradle/gradle/issues/12440#issue-576216391 issue too.
So I added following in my android/app/build.gradle to build successfully
android { ndkVersion "21.3.6528147"<----your installed NDK version here }
Solved issues after adding this line and rebuild project
implementation 'com.facebook.android:facebook-android-sdk:8.1.0' // add this line in your app module under dependencies
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> // add this line in your manifest
string file add
🐛 Bug Report
Hello friends. After loading with npm install react-native-fbsdk, the application crashed after the compilation is completed. When I run it in development mode, I get the following error. How can I solve the problem?
The following edits were made Settings.gradle
project(':react-native-fbsdk').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-fbsdk/android')
app/build.gradleTo Reproduce
Expected Behavior
The production build completes with no error.
Code Example
Environment