React-native: ASK about FBSDKPackage

Created on 4 Jul 2017  路  2Comments  路  Source: facebook/react-native

Hi, im have some trouble about react-native. when im run react-native run-android. its show error about:
error: constructor FBSDKPackage in class FBSDKPackage cannot be applied to given types; new FBSDKPackage(), ^ required: CallbackManager found: no arguments reason: actual and formal argument lists differ in length 1 error :app:compileDebugJavaWithJavac FAILED

any suggest to solve this? thanks

Locked

Most helpful comment

Hi,

This issue is definitely related to "react-native-fbsdk" package and not to react-native itself. And it's documentation clearly says that you have to pass "mCallbackManager" into a FBSDKPackage constructor: Docs.
That's exactly what the error says, "required: CallbackManager, found: no arguments".

All 2 comments

Hi,

This issue is definitely related to "react-native-fbsdk" package and not to react-native itself. And it's documentation clearly says that you have to pass "mCallbackManager" into a FBSDKPackage constructor: Docs.
That's exactly what the error says, "required: CallbackManager, found: no arguments".

Take a look at getPackages function in MainApplication. Make sure that new FBSDKPackage() is not on the list before new FBSDKPackage(mCallbackManager). In my case I had it listed twice and that was breaking the build.

Was this page helpful?
0 / 5 - 0 ratings