找不到com.android.support:support-v4:22.0.0. SDK更新后 [英] Could not find com.android.support:support-v4:22.0.0. after SDK update
问题描述
SDK更新后,即时通讯无法创建Hello World应用程序. 我的build.gradle看起来像这样
After the sdk update im not able to create a hello world application. My build.gradle looks like this
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.coders.yo"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
但是构建失败并显示
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:support-v4:22.0.0.
Required by:
Yo:app:unspecified > com.android.support:appcompat-v7:22.0.0
所以我添加了编译'com.android.support:support-v4:22.0.0'.现在我得到了
so i added compile 'com.android.support:support-v4:22.0.0.' and now i get
Error:Failed to find: com.android.support:support-v4:22.0.0.
<a href="openFile">Open File</a><br><a href="open.dependency.in.project.structure">Open in Project Structure dialog</a>
我已经更新了android sdk 和支持库
I have updated the android sdk and the support libraries
过去几个小时我一直被困在里面.请有人帮我确定问题
I have been stuck in it for the past few hours .Can some one please help me identify the issue
推荐答案
您在build.gradle中的依赖关系似乎是正确的.
Your dependencies in build.gradle seem to be correct.
尝试清理缓存(文件->使缓存无效并重新启动),然后同步gradle文件并清理并构建.
Try to clean the cache (File -> Invalidate cache and restart), then sync the gradle file and clean and build.
在gradle文件中有一个奇怪的行. 上一个gradle插件(您使用的是哪个版本?)中不存在此DSL
In your gradle file there is a strange line. This DSL doesn't exist in last gradle plugin (which version are you using?)
runProguard false
您应该更新插件(1.1.0),gradle版本(2.2.1)并在
You should update the plugin (1.1.0), the gradle version (2.2.1) and change this line in
minifyEnabled false
这篇关于找不到com.android.support:support-v4:22.0.0. SDK更新后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!