无法找到:com.android.support:support-v4:22.2.0 [英] Failed to find: com.android.support:support-v4:22.2.0

查看:672
本文介绍了无法找到:com.android.support:support-v4:22.2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个应用程序,但似乎有与摇篮文件的一些错误了。这是工作的罚款,直到我升级了支持库。 我正与API的21后就正常了,但后来我升级到api22并改变相应的摇篮文件。现在这个错误出现了。

I am trying to do an application but there seems to be some error with the gradle files now. It was working fine until I upgraded the support libraries. I was working with api 21 which worked fine, but then i upgraded to api22 and changed the gradle files accordingly.. Now this error shows up.

 Error:Failed to find: com.android.support:support-v4:22.2.0

这是我目前的摇篮文件:

This is my current gradle file :

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.example.sampleapp"
    minSdkVersion 12
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
}

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

如果这可能帮助别人,经过多次试验和错误,我发现,我是针对了错误的SDK版本(一老一)在build.gradle文件对应于库。要改变这一点,你可以自己动手完成,或进入模块设置菜单(右键点击你的项目文件夹 - >打开模块设置然后,在库 - 属性可以改变编译SDK和编译工具版本。

If this might help someone, after MANY trials and errors, I found that I was targeting the wrong SDK version (an older one) in the build.gradle file corresponding to "library". To change this you can do it by hand or go to the Module Settings Menu (right click on your project folder -> Open Module Settings. Then in "library" - Properties you can change the Compile Sdk and the Build Tools Versions

输入图像的描述在这里

这篇关于无法找到:com.android.support:support-v4:22.2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆