facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

Not compatible with my project #651

Open kajalbh99 opened 4 years ago

kajalbh99 commented 4 years ago

🐛 Bug Report

After linking the plugin i got build error in android studio

To Reproduce

react-native link react-native-fbsdk

Expected Behavior

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at manifestMerger7748343748761242785.xml:7:5-9:19 to override.

Code Example

build.gradle file - buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" googlePlayServicesAuthVersion = "16.0.1"

}
repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.3.1'
    classpath 'com.google.gms:google-services:4.1.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

dependencies { implementation 'com.facebook.android:facebook-android-sdk:[5,6)' implementation project(':react-native-fbsdk') implementation project(':react-native-vector-icons') implementation project(':react-native-maps') implementation project(':react-native-linear-gradient') implementation project(':react-native-image-picker') implementation project(':react-native-gesture-handler') implementation project(':react-native-google-signin') implementation project(':@react-native-community_async-storage') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" implementation "com.facebook.react:react-native:0.59.8" // From node_modules }

Environment

React Native Environment Info: System: OS: Windows 10 CPU: (4) x64 Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz Memory: 1.19 GB / 7.80 GB Binaries: npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312