[英]Android Studio Gradle cannot find 'com.android.support:design:22.2.0' (the Android Design Support Library)
This issue has been incredibly frustrating for me for the past two weeks. 在过去的两周里,这个问题令我非常沮丧。
Using the Android SDK Manager, I updated the following: 使用Android SDK Manager,我更新了以下内容:
Tools:
Android SDK Tools rev. 24.3.3
Android SDK Platform-tools rev. 22
Android SDK Build-tools rev. 22.0.1
Android 5.1.1 (API 22):
SDK Platform rev. 2
Google APIs rev. 1
Sources for Android SDK rev. 1
Extras:
Android Support Repository rev. 16
Android Support Library rev. 22.2.1
Google Repository rev.22
This is the exact list of all the repositories that I've installed and updated to with the Android SDK Manager. 这是我使用Android SDK Manager安装和更新的所有存储库的完整列表。
However, when I attempt to add the line: 但是,当我尝试添加该行时:
compile 'com.android.support:design:22.2.0'
Gradle becomes stuck on addDependecies. Gradle卡在addDependecies上。 Furthermore, when I go to Module Settings, and then to Dependencies, when I try to add a new library, the 'com.android.support:design:22.2.0' does not appear within the list!
此外,当我转到模块设置,然后转到依赖关系时,当我尝试添加新库时,'com.android.support:design:22.2.0'不会出现在列表中!
Here's additional information about my target, compile, and minimum SDK version: 以下是有关我的目标,编译和最低SDK版本的其他信息:
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.myandroidapplication.newtestapp"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
What could I possibly be missing at this point? 那时我可能会错过什么? Thank you!
谢谢!
您必须使用计算机上安装的22.2.1版。
compile 'com.android.support:design:22.2.1'
For me, I was initially adding the support library dependency by typing it out in the build.gradle of my app directly. 对我来说,我最初是通过直接在我的应用程序的build.gradle中输入来添加支持库依赖项。 I cleaned the line that I had typed and added the dependency through the android studio GUI,
我清理了我输入的行,并通过android studio GUI添加了依赖项,
Don't know why, but it works for me at least. 不知道为什么,但它至少对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.