什么版本的支持库我想在我的应用程序添加CardView
所以我增加了以下依赖于我的gradle这个安装在我的Android工作室
compile 'com.android.support:cardview-v7:22.2.1'
我意识到的错误时,因为我给出了错误的版本号。在谷歌官方文档考虑看看后,我才知道,Android Support Repository
是用来装appcompat
库。
正如你可以看到我已经安装的支持库是33版。但是如果我改变我的gradle到版本33它仍然显示错误。
我如何检查我有在Android Studio中的是什么版本AppCompatLibrary的?
编辑:
build.gradle
文件
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 22
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.spintum.preexam"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
// compile fileTree (dir:'libs',include:'achartengine-*.jar')
//compile fileTree('libs/achartengine-1.1.0.jar')
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:percent:22.2.0'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:cardview-v7:+'
//compile 'com.android.support:recyclerview-v7:22.2.+'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
compile 'com.google.android.gms:play-services-identity:8.3.0'
compile 'com.google.android.gms:play-services-plus:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.github.markushi:circlebutton:1.1'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:[email protected]'
}
33是不正确的......应该是23. https://developer.android.com/topic/libraries/support-library/features.html#v7 –