I am trying to build my react-native project and using react-native fbsdk.
However, I get these errors:
/home/luiz/MYP/app/node_modules/react-native-fbsdk/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/home/luiz/MYP/app/node_modules/react-native-fbsdk/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
/home/luiz/MYP/app/node_modules/react-native-fbsdk/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/home/luiz/MYP/app/node_modules/react-native-fbsdk/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
:react-native-fbsdk:processReleaseResources FAILED
My current OS is Linux Elementary 0.4.1 Loki x64.
I am using react-native@0.37.0 and, because of this, react-native-fbsdk@0.4.0.
I've already tried:
cd android && ./gradlew clean
delete the project and re
npm install
itand try in Android API's 23 and 24.
For those who are looking for make it work using RN 0.42 which by now is the one with react version stable you may need to use the Facebook SDK 4.18.0
"com.facebook.android:facebook-android-sdk:4.18.0"
which is the one that was released by the time thatreact-native-fbsdk@0.5.0
was released, otherwise you may be ending up with the issue: https://developers.facebook.com/bugs/1712442065726889/Besides, if you are getting hard times to force the facebook sdk to be what you need try this:
android/app/build.gradle
android/build.gradle
I just encountered this error. First, RN Facebook SDK v.0.6.0 only works for
react-native >= 0.44.0
, so you have to update your dependency inpackage.json
toreact-native: ^0.44.0
. Then go to Androidbuild.gradle
file and make this changes:compileSdkVersion 25
andcompile "com.android.support:appcompat-v7:25.0.0"
As you can see here there is patches incoming,
https://github.com/facebook/react-native-fbsdk/pull/339 https://github.com/facebook/react-native-fbsdk/pull/338
in the meantime if you're using react-native-fbsdk v0.5 you could do
yarn add react-native-fbsdk@https://github.com/tugorez/react-native-fbsdk
I've applied the suggested changes and it's working :) but please be aware I'll no support this and wont keep it update so... as soon as you can you should go back to the official library.
I was able to resolve this without modifying files under
node_modules/...
. I upgraded ourreact-native-fbsdk
version to0.6.0
and then add this to our application'sbuild.gradle
file to pinfacebook-android-sdk
at version4.22.1
:Edit: We are building with:
this fixed for me
in
android/build.gradle
After digging into gradle, I came up with following solution.
Key is to exclude
facebook-android-sdk
required byreact-native-fbsdk
and pull in desired (working) version onfacebook-android-sdk
module - preferably without modifying anything in node_modules folder.Fortunately, gradle offers this.