我想使用FloatingActionButton
,但我需要这个库:
compile 'com.android.support:design:22.2.0'
但是当我将它添加到我的Gradle中时,我收到以下信息:
A problem occurred configuring project ':myModule'.
Could not resolve all dependencies for configuration ':myModule:_debugCompile'.
Could not find com.android.support:design:22.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/design/22.2.0/design-22.2.0.pom
https://jcenter.bintray.com/com/android/support/design/22.2.0/design-22.2.0.jar
file:/D:/Development/Android/sdk/extras/android/m2repository/com/android/support/design/22.2.0/design-22.2.0.pom
file:/D:/Development/Android/sdk/extras/android/m2repository/com/android/support/design/22.2.0/design-22.2.0.jar
file:/D:/Development/Android/sdk/extras/google/m2repository/com/android/support/design/22.2.0/design-22.2.0.pom
file:/D:/Development/Android/sdk/extras/google/m2repository/com/android/support/design/22.2.0/design-22.2.0.jar
Required by:
myProject:myModule:unspecified
我尝试更新我的Android SDK,但是所有内容都是最新的:
那么为什么无法解决com.android.support:design:22.2.0
?
这是我的gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "de.bla.myProject"
minSdkVersion 19
targetSdkVersion 22
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':androidcircularcrop_lib')
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:design:22.2.0'
compile files('libs/eventbus-3.0.0-beta1.jar')
compile files('libs/mpandroidchartlibrary-2-1-0.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
buildToolsVersion
设置为 22.0.1。 - Mikhail