首页 文章

找不到com.android.support:appcompat-v7:27.1.0

提问于
浏览
0

我检查并更新了我的android SDK(也是react-native-image-crop-picker),但我一直找不到支持27.的版本 .

以下是更多信息

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

}

依赖{

编译'com.facebook.react:react-native:'

编译'com.github.yalantis:ucrop:2.2.2-native'

编译'id.zelory:压缩器:2.1.0'

}

2 回答

  • 0

    似乎Gradle正在寻找本地存储中的指定库 . 尝试adding the Google's Maven repository到您的顶级 build.gradle 文件 .

  • 2

    检查您是否有脱机工作 .

    去:

    在搜索栏上>文件>设置>写“离线”>在Gradle下,查看是否选中了脱机工作 . 如果是这样,取消选中它 .

相关问题