导入adt工程,编译时遇到这个报错。
这里的22是 build.gradle(Module:app)的compileSdkVersion
这里的版本要跟sdk platforms 里的api level一致,即已有18,22的就修改为18或者22,改其他的就会报错
compileSdkVersion 18
targetSdkVersion 18
compile 'com.android.support:support-v4:18.0.0'
这三个要一致
apply plugin: 'com.android.application'
android {
compileSdkVersion 18
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.xiaowu.calendar"
minSdkVersion 14
targetSdkVersion 18
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
}