react-native-fbsdk makes my build fail
See original GitHub issueIs this a bug report?
YES
Have you read the Contributing Guidelines?
YES
Environment
OS: macOS Sierra 10.12.6
Node: 8.9.3
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: 9.1 (9B55)
Android Studio: 3.0 AI-171.4443003
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: confirmyarn add react-native-fbsdk
- react-native link react-native-fbsdk
- configure native project as described here
- react-native run-android
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:
➜ my-test-app react-native run-android
Scanning folders for symlinks in /Users/sunrising/Documents/work/sitrap/my-test-app/node_modules (7ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-fbsdk'.
> Could not resolve all dependencies for configuration ':react-native-fbsdk:_debugPublishCopy'.
> Could not find com.android.support:appcompat-v7:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified
> Could not find com.android.support:appcompat-v7:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.react:react-native:0.50.3
> Could not find com.android.support:support-annotations:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0
> Could not find com.android.support:support-core-utils:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0
> Could not find com.android.support:appcompat-v7:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
> Could not find com.android.support:cardview-v7:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
> Could not find com.android.support:customtabs:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
> Could not find com.android.support:support-v4:27.0.1.
Searched in the following locations:
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
file:/Users/sunrising/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
file:/Users/sunrising/Documents/work/sitrap/my-test-app/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
Required by:
mytestapp:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11.653 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Reproducible Demo
Take a look at Steps to Reproduce
Issue Analytics
- State:
- Created 6 years ago
- Reactions:43
- Comments:27 (3 by maintainers)
Top Results From Across the Web
React native build fail react-native-fbsdk - Stack Overflow
the commands are first try npm i jetifier and then npx jetify to solve your problem. Hope it helps, feel free for doubts....
Read more >failed to build project, possibly related to react-native-fbsdk ...
Hi everybody, in my react-native app I am SUDDENLY getting this build error! It seems to be related to react-native-fbsdk-next I'm using.
Read more >react-native-fbsdk-next - npm
I get this build error: no type or protocol named UIApplicationOpenURLOptionsKey : Your Xcode version is too old. Upgrade to Xcode 10.0+. You ......
Read more >React-native – Facebook Sdk Android Error Building - iTecNote
I am trying to build my react-native project and using react-native fbsdk. However, I get these errors:
Read more >gradle build failed after installing react-native-fbsdk with error ...
Coding example for the question gradle build failed after installing react-native-fbsdk with error of Error retrieving parent for item: No resource found ...
Read more >Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had to define the facebook sdk version on
android/build.gradle
:Adding a maven repository url to google solved this for me: