CUR_SPACE=. culpritLocation=$CUR_SPACE/node_modules/react-native-fbsdk/android/build.gradle sed -i -e 's/com.facebook.android:facebook-android-sdk:4.+/com.facebook.android:facebook-android-sdk:4.26.0/' $culpritLocation printf "Fixed Could not resolve all dependencies for configuration ':react-native-fbsdk:_debugPublishCopy'.\n> Could not find com.android.support:appcompat-v7:27.0.1." printf "fix_rn_fbsdk_google_libraries.sh should be removed at a later time\n"
Put the above script in the root of your project responsible for the reaction, add execute rights to it, then add in package.json in the postinstall property. / your -script-name.sh ;. Example:
{ "name": "AppName", "version": "1.28.14", "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "postinstall": "./fix_rn_fbsdk_google_libraries.sh; ./infuse_version.sh;" }, [..] }
If you are not familiar with postinstall scripts, they will start immediately after running the npm install / yarn command.
The proposed solution works with cloud building tools :), and this is temporary. Future releases of rn-fbsdk should solve the problem.
Webraptor
source share