-
Notifications
You must be signed in to change notification settings - Fork 169
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
[SOLVED: use react-native 0.63+ or patch locally] react-native-fbsdk-next:compileDebugJavaWithJavac #30
Comments
I think I solved this with Android Studio help because I'm not so familiar with Java... In
Then in
So, I pass is this really how to solved it? Or I am doing it wrong but it still works? |
Only one thing is missing in this which I already recommended in commit review |
When can we expect this fix with new release? |
You should update to at least react native 0.63 I think? 62 has no official support for the base react native framework since xcode 12.5 came out |
@ts-amir-shaikh alternative method is to fix yourself locally until you can update to a modern react-native version - patch-package is the thing everyone uses for this - apply the patch locally and move on: https://github.com/ds300/patch-package |
Yes, I forgot to mention it, import com.facebook.react.bridge.ReactApplicationContext; |
Can this please me mentioned in troubleshooting part of Readme? |
I made the title prescriptive and pinned it on the repo. At this point effectively no one should be using 0.62 or lower as it literally does not compile with current Xcode, it's broken completely. |
@mikehardy Yes working with the patch for now |
closing as #31 got merged |
How should we apply this patch ? I am not familiar with applying patches |
Hello, I couldn't apply this because my FBProfileModule.java is not familiar with yours example. I have this:
How should i edit this ? |
You don't? The fix was merged so it's not necessary. Make sure you are using the current release here before attempting any troubleshooting, otherwise you may end up just chasing ghosts |
you're faster than me @mikehardy :p |
Haha just getting that first cup of coffee and rolling through notifications @thebergamo 😁☕ cheers |
:) Well, i am receiving exact same error. Hence my RN version is 0.61.5 , I use 4.2.0 and cant use 4.3.0 as the document says. So I am looking for a fix on 4.2.0 |
I believe 4.3.0 was specifically released to restore compatibility with older RN versions. The document may be out of date. How did it go when you tried it? |
I did not try it hence document clearly says To use this library you need to ensure you match up with the correct version of React Native you are using.. `
` So I am not talking gibberish mate |
Didn't say you were talking gibberish:
I said "The document may be out of date. " not "you're talking gibberish." You should try it, report results. |
My apologies, you were right! Document needs a correction. It works on both android and iOS perfectly. Sorry I got you wrong. Thanks! |
Fantastic! I was about to be really confused if it did not work actually since it was the point of the change before. But documentation frequently goes out of date, yes. I'll hit the edit button at the top of the page and propose a change to the ranges now that we are compatible again |
After work on #30, older versions are functional again but without testing they may break again in the future. Expose this tradeoff to library consumers
@ugrdursun what do you think of #71 ? I tried to expose the actual technical tradeoff if old versions are used - they do work now and we are not trying to break anyway, but it could happen by accident again since old versions are out of support really, meaning no one tests on them actively |
With RN 0.61.5 and library 4.3.0 I did not receive any crash reports on a live app with around 15k+ users |
I also have RN 0.61.5 and would like to use the 4.3.0 library if it fixes issues like mentioned above, but when I tried to install it, npm gave an err saying "unable to resolve dependency tree" since the dependency is >=0.63.3 It says Not sure if it's ok to force something like this... is this how you did it? @ugrdursun I guess a better question is - is it safer/better for long term stability to use 4.2.0 and just try to fix the android issue, or use 4.3.0 despite the dependency conflict? |
use older npm or --legacy-peer-deps but really update react-native for long term stability |
I am using 4.3.0 with 0.61.5 for more than a month and working fine on me. I think dependency conflict is not that deeper to cause any huge problem here. |
Hi, months ago I use
react-native-fbsdk
and everything is already set. And this week I found that lib is already archived and it says to usereact-native-fbsdk-next
instead. So, I removedreact-native-fbsdk
and installreact-native-fbsdk-next
. I thought I don't need to follow any steps in Android Getting Started Guide because I already done that. I am able to run iOS but get an error in Android:((my_directory_path))/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/FBProfileModule.java:16: error: constructor ReactContextBaseJavaModule in class ReactContextBaseJavaModule cannot be applied to given types;
public class FBProfileModule extends ReactContextBaseJavaModule {
^
required: ReactApplicationContext
found: no arguments
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: ((my_directory_path))/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/Utility.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.
Execution failed for task ':react-native-fbsdk-next:compileDebugJavaWithJavac'.
I never change anything yet and get this error. Then I open my app/build.gradle and found my old code:
implementation 'com.facebook.android:facebook-core:5.+'
I tried to replace it with:
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
or
implementation 'com.facebook.android:facebook-core:[8,9)'
but it gives no effect. I also do manually linking but still the same. So can anyone help me to solve this please?
Environment
The text was updated successfully, but these errors were encountered: