I'm trying to use Facebook login on my app, but when i try to run my application on Android i receive this message. When i go to my mainApplication.java to see if there is something duplicated, everything looks alright. By the way, on IOS it's working.
my config is
"react": "16.8.6",
"react-native": "0.60.4",
"react-native-fbsdk": "^1.0.1",
"react-native-firebase": "~5.5.6"

@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RNFirebaseNotificationsPackage());
packages.add(new RNFirebaseMessagingPackage());
packages.add(new FBSDKPackage());
return packages;
}
I think you need to remove the packages.add(FBSDKPackage) line. The package should work with autolinking and doesn鈥檛 need to be included manuallly.
@janicduplessis
Remove the packages.add(FBSDKPackage) line
Error
The sdk has not been initialized make sure to call facebooksdk.sdkinitialize
Had the same issue. had no duplicates in mainapplication file. Solved it by removing the packages.add(new FBSDKPackage()) line. just like @janicduplessis suggested because that module was already being returned by getPackages() method. That's why it was being added again.
Remove the packages.add(FBSDKPackage) line
Error
The sdk has not been initialized make sure to call facebooksdk.sdkinitialize
Most helpful comment
I think you need to remove the packages.add(FBSDKPackage) line. The package should work with autolinking and doesn鈥檛 need to be included manuallly.