-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
react-native-fbsdk makes my build fail #17147
Comments
I have the same issue. |
now i have in my
but i always get
|
This might be a problem in react-native-fbsdk or your app setup. I suggest asking this on the react-native-fbsdk or stackoverflow.
|
@facebook-github-bot stack-overflow |
@chirag04 it seems that react-native-fbsdk has the issue section disabled, I will try in stackoverflow anyway... have you ever seen something like this? |
Hey @sun2rise, thanks for posting this! @chirag04 tells me this issue looks like a question that would be best asked on Stack Overflow. Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. |
For me this was the simplest solution. |
I had to define the facebook sdk version on
|
I tried it @yannickschuchmann @crysfel But returns to me another error: It works to me, with
Thanks! |
@rafaesc You might be using a lower compileSdkVersion and buildToolsVersion under android/app/build.gradle. I had used 23 and 23.0.1 respectively, and had the same problem as you. When I used 26 and 26.0.1, I could use the solution by @yannickschuchmann
|
Error reappeared in |
@nenti, yes, I had to change to 0.6.3 version, I need a new solution for 0.7.0 |
0.70.0 works for as long as I stick to older sdk libraries. When I use latest sdk library, app crashes on launching. |
I try all the solution which have been provided but it didn't work. |
Adding a maven repository url to google solved this for me:
|
for react-native-fbsdk 0.7.0, as explain #17147 (comment) @rafaesc, you need to upgrade your settings: and there is an error in facebook docs: |
@heralight use <-- this is the same as facebook doc right? I just tested in a new blank app with: My app BUILD SUCCESSFUL but app crashed. |
what a idiot SDK, cant get success build |
Yeah, given that this is a Facebook module meant to work with their own react-native framework, I must say this should have been much more robust |
@chuckcwh there is an error in https://developers.facebook.com/docs/android/getting-started/ Have you any log on crash, rn or android ? |
@heralight Finally I got it to work!What I did after following the tutorial the errors were
then I added this to build.gradle allprojects { the error became this:
then in app/build.gradle I changed to defaultConfig { And then It works on android now :) |
@chuckcwh if you upgrade compileSdkVersion and buildToolsVersion, you don't need to |
Just changing compileSdkVersion, buildToolsVersion and targetSdkVersion to 26, "26.0.1" and 26 respectively in app/build.gradle solved it for me. Thanks @heralight and @chuckcwh ! |
Just a comment. Using API 26 is breaking the Dev Menu in Android 8, because of a change in permissions with the overlay. Just blindily putting a greater compileVersion is not that good idea. |
I followed all the steps by @chuckcwh but still my app is crashing in debug |
So to get FB-login working in react-native you have to up target and compile sdk to 26? Which isnt supported by react native? Or, not to risk breaking anything, I have to use a old version of fbsdk targeting sdk 23? |
Is this a bug report?
YES
Have you read the Contributing Guidelines?
YES
Environment
Packages: (wanted => installed)
"react": "^16.0.0-beta.5"
"react-native": "^0.49.5"
Steps to Reproduce
create-react-native-app my-test-app
cd my-test-app
npm run eject
3.1. option1: React Native: I'd like a regular React Native project
3.2 option2: give a name
3.3 option3: confirm
yarn add react-native-fbsdk
Expected Behavior
The app is built and runs on android without any problem
Actual Behavior
I have this error during the build of the project:
Reproducible Demo
Take a look at Steps to Reproduce
The text was updated successfully, but these errors were encountered: