Reputation: 11
I checked and updated my android SDK (also react-native-image-crop-picker), but I couldn't find the version of support 27.+ all the time.
below are more information
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-image-crop-picker'.
Could not resolve all dependencies for configuration ':react-native-image-crop-picker:_debugPublishCopy'.
Could not find com.android.support:appcompat-v7:27.1.0.
Searched in the following locations:
file:/D:/AndroidSDK/extras/android/m2repository/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.pom
file:/D:/AndroidSDK/extras/android/m2repository/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.jar
file:/C:/Users/***/Desktop/LastDesign/InsurAgentApp/android/sdk-manager/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.jar
Required by:
InsurAgentApp:react-native-image-crop-picker:unspecified > com.facebook.react:react-native:0.54.2
Could not find com.android.support:appcompat-v7:27.1.0.
Searched in the following locations:
file:/D:/AndroidSDK/extras/android/m2repository/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.pom
file:/D:/AndroidSDK/extras/android/m2repository/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.jar
file:/C:/Users/***/Desktop/LastDesign/InsurAgentApp/android/sdk-manager/com/android/support/appcompat-v7/27.1.0/appcompat-v7-27.1.0.jar
Required by:
InsurAgentApp:react-native-image-crop-picker:unspecified > com.github.yalantis:ucrop:2.2.2-native
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
build.gradle:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.github.yalantis:ucrop:2.2.2-native'
compile 'id.zelory:compressor:2.1.0'
}
Upvotes: 1
Views: 3716
Reputation: 142
It seems that Gradle is looking for the specified libraries in your local storage. Try adding the Google's Maven repository to your top-level build.gradle file.
Upvotes: 3
Reputation: 634
Check if you have offline work on.
Go to:
File > Settings > write "offline" on the search bar > under Gradle, see if Offline Work is checked. If so, uncheck it.
Upvotes: 0