在SDK更新后,我无法创建一个“Hello World”应用程序。我的build.gradle文件看起来像这样:
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
所以我添加了 compile 'com.android.support:support-v4:22.0.0.' 现在我得到了
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和支持库
在过去的几个小时里,我一直被卡住了。有人可以帮忙识别问题吗?