Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to v13.0.0 , build failed for android #524

Closed
nemapranay opened this issue May 2, 2024 · 4 comments
Closed

Upgrading to v13.0.0 , build failed for android #524

nemapranay opened this issue May 2, 2024 · 4 comments

Comments

@nemapranay
Copy link

Android build is failing here

we are on

react-native:0.64.2
react-native-fbsdk-next: 13.0.0

After upgrading this repo from 6.2.0 to 13.0.0 its having issue with android

it worked fine in iOS but having issues with android.

as i am trying to run android build

react-native run-android

then build failed with :
issue:

app/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButton.java:66: error: cannot find symbol
mEventDispatcher.dispatchEvent(new RCTLoginButtonEvent(UIManagerHelper.getSurfaceId(context), getId(), event));
^
symbol: method getSurfaceId(ReactContext)
location: class UIManagerHelper

/RCTLoginButton.java:89: error: cannot find symbol
mEventDispatcher.dispatchEvent(new RCTLoginButtonEvent(UIManagerHelper.getSurfaceId(context), getId(), event));
^
symbol: method getSurfaceId(ReactContext)
location: class UIManagerHelper

app/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButton.java:101: error: cannot find symbol
mEventDispatcher.dispatchEvent(new RCTLoginButtonEvent(UIManagerHelper.getSurfaceId(context), getId(), event));
^
symbol: method getSurfaceId(ReactContext)

app/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButtonEvent.java:13: error: no suitable constructor found for Event(int,int)
super(surfaceId,viewTag);
^
constructor Event.Event() is not applicable
(actual and formal argument lists differ in length)
constructor Event.Event(int) is not applicable
(actual and formal argument lists differ in length)

app/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/FBProfileModule.java:50: warning: non-varargs call of varargs method with inexact argument type for last parameter;
callback.invoke(null);

Like this 7 errors i got

Can some one please help here with solution ?

@NahuelRobles
Copy link

NahuelRobles commented May 15, 2024

I have the same error!
the problem is with:
import com.facebook.react.uimanager.UIManagerHelper;
in the File:
src/main/java/com/facebook/reactnative/androidsdk/RCTLoginButton.java
if you install version 12.1.5 it will work fine

@nemapranay
Copy link
Author

@NahuelRobles but for apple compliance we need signed SDK for which will have privacy manifest, as iOS and android version we need to keep same that is 13.0.0.

can u suggest here ?

@maxwellwachira
Copy link

Having the same issue. I have successfully built for iOS but the build fails for android with the following error message:
Failed to apply plugin 'com.facebook.react.rootproject'.

A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> org/jetbrains/kotlin/gradle/plugin/mpp/pm20/KotlinCompilationData

@nemapranay
Copy link
Author

after upgrading react native to 0.71.19 it worked , Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants