首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到com.android.support:appcompat-v7:27.1.0

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

Stack Overflow用户
提问于 2018-05-23 10:27:24
回答 2查看 3.6K关注 0票数 1

我检查并更新了我的android (也是react原生图像-裁剪器),但是我始终找不到支持27.+的版本。

下面是更多的信息

代码语言:javascript
复制
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

代码语言:javascript
复制
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'

}
EN

回答 2

Stack Overflow用户

发布于 2018-05-23 15:27:39

看起来Gradle正在本地存储中寻找指定的库。尝试添加Google的Maven存储库到顶级build.gradle文件。

票数 3
EN

Stack Overflow用户

发布于 2018-05-23 10:37:07

检查是否有脱机工作。

请转至:

文件>设置>在搜索栏>下写“脱机”,查看是否选中了脱机工作。如果是的话,取消检查。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50485978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档