Reputation: 373
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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
beostore:react-native-fbsdk:unspecified
> Could not find com.android.support:appcompat-v7:27.0.1.
Searched in the following locations:
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
beostore:react-native-fbsdk:unspecified > com.facebook.react:react-native:0.46.4
> Could not find com.android.support:support-annotations:27.0.1.
Searched in the following locations:
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
Required by:
beostore: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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
Required by:
beostore: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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
Required by:
beostore: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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
Required by:
beostore: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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
Required by:
beostore: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:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
file:/home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
file:/home/ubuntu/git/mstore-pro/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
Required by:
beostore:react-native-fbsdk:unspecified > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
compileSdkVersion 25
buildToolsVersion "25.0.0"
targetSdkVersion 25
Upvotes: 31
Views: 9999
Reputation: 1226
Follow these Steps and Make your Build Successful
Go to Project build.gradle file
adding maven {url"https://maven.google.com"}
Will download the missing items .
android/build.gradle file
and restrict fbsdk Version to 4.28.0
.
OTHER WAY
Go to node_modules/react-native-fbsdk
: build.gradle
change to compileSdkVersion 26 or 27
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
url "https://maven.google.com"
}
configurations.all {
resolutionStrategy {
force 'com.facebook.android:facebook-android-sdk:4.28.0'
}
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
Upvotes: 5
Reputation: 685
The accepted answer does the trick but a cleaner solution would be to restrict the android fbsdk version used in the react native fbsdk library. Adding the below code to project(root) build.gradle made sure that the specified version of fbsdk is used by all library projects.
allprojects {
repositories {
...
configurations.all {
resolutionStrategy {
force 'com.facebook.android:facebook-android-sdk:4.28.0'
}
}
}
}
Upvotes: 34
Reputation: 83
Updating Android studio solved this for me...
Below are the steps I followed
Upvotes: 0
Reputation: 183
I have the same issue since this morning and as far as I can see it is a problem with the react-native-fbsdk library and android support repository.
If you go into any of the subfolders on the path where your sdk is installed (in your case) "home/ubuntu/Android/Sdk/extras/android/m2repository/com/android/support" you will probably see the "26.0.0-alpha1" as the last folder even though google (https://dl.google.com/dl/android/maven2/index.html - collapse com.android.support) clearly suggests the last folder should be "27.0.2"!
I have tried downloading the latest android_m2repository from the acquired link: https://dl.google.com/android/repository/android_m2repository_r47.zip but it is also missing all the following folders: 26.0.0-beta1, 26.0.0-beta2, 26.0.0, 26.0.1, 26.0.2, 26.1.0, 27.0.0, 27.0.1, 27.0.2
I managed to remove the error by editing node_modules/react-native-fbsdk/android/build.gradle
compile('com.facebook.android:facebook-android-sdk:4.28.0')
but am still not able to build and I am sure this is not the propper way to go even if you are able to build!
Upvotes: 7
Reputation: 162
I've faced the same issue today.
Looks like there is some problem with react-native-fbsdk
package;
I've found the only way to solve it for now:
at node_modules/react-native-fbsdk/android/build.gradle
change compile('com.facebook.android:facebook-android-sdk:4+')
to compile('com.facebook.android:facebook-android-sdk:4.26.0')
This is very bad solution.
If you will find proper way to solve it - please share.
Upvotes: 13