android - 无法解析 : com. android.support :appcompat-v7:22. 2.1

标签 android android-studio android-support-library android-appcompat

当我导入eclipse项目到AS时,出现错误:

E:\studioWorkspace\YTHDBL\yTHDBL\build.gradle
Error:Error:line (25)Failed to resolve: com.android.support:appcompat-v7:22.2.1
Install Repository and sync project
Show in File
open.dependency.in.project.structure
Show in Project Structure dialog</a>
Error:Error:line (24)Failed to resolve: com.android.support:support-v4:22.2.1   
Install Repository and sync project
Show in File
open.dependency.in.project.structure
Show in Project Structure dialog

我搜索答案并找到了这个:how do I properly install support_v7

我是否设置了错误的支持库编号?,我尝试了22.0.0,22.2.0.....,但不起作用。

在我的 sdk 管理器中,已安装 Android 支持存储库,版本 16,并且已经安装 Android 支持库,版本 22.2.1。 谷歌存储库也已安装。

这是我的 build.gradle:

 dependencies {
    compile project(':library')
    compile project(':alipay_lib')
    compile project(':sMSSDK')
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile files('libs/alipay.jar')
    compile files('libs/android-query.0.25.10.jar')
    compile files('libs/baidumapapi_v3_1_0.jar')
    compile files('libs/commons-codec-1.6.jar')
    compile files('libs/jackson-core-asl-1.9.11.jar')
    compile files('libs/jackson-mapper-asl-1.9.11.jar')
    compile files('libs/jpush-sdk-release1.7.5.jar')
    compile files('libs/locSDK_4.2.jar')
    compile files('libs/umeng-analytics-v5.5.3.jar')
    compile files('libs/zxing.jar')
}

问题出在哪里?现在我在AS中找不到“重试”按钮,我该如何重试?

最佳答案

我打开了 android_sdk,然后更新了 Android 支持存储库、Android 支持库和 Google 存储库,因此 Intellij 中的问题得到了解决。

关于android - 无法解析 : com. android.support :appcompat-v7:22. 2.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31740393/

相关文章:

android - Material 对话框库,错误: No resource found that matches the given name 'android:Theme.Material.Light.Dialog.Alert'

java - 如何制作面向android的应用程序修复?

android wifi状态随广播接收器改变

android - 在 Android 上调用 POST API

android - Android-Studio错误:链接引用失败

android-studio - 如何在没有支持库的情况下在Android Studio中创建项目?

java - Field.getGenericType() 返回 java.lang.Class 的实例而不是 Type

java - 当屏幕方向改变时,如何防止布局被重置?

java - 无法解析 : lifecycle-runtime-2. 2.0

android - 我在哪里可以找到 android.support.v7.mediarouter.R$attr?