我最近在 2.3 中更新了我的android工作室。现在我想改变我的目标sdk并将sdk编译成api 25
但我应该编译哪个依赖项?现在我的目标sdk和编译sdk是api 23
而我正在编译依赖23.4.0
提前谢谢
我的gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example.application"
minSdkVersion 14
targetSdkVersion 25
versionCode 60
versionName "2.2.6.25"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.android.support:appcompat-v7:23.4.0',
'com.android.support:design:23.4.0',
'com.android.support:cardview-v7:23.4.0',
'com.android.support:recyclerview-v7:23.4.0',
'com.android.support:support-annotations:23.4.0',
'com.android.support:multidex:1.0.1')
compile 'com.itextpdf:itextg:5.5.9'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services:6.1.71'
testCompile 'junit:junit:4.12'
}
答案 0 :(得分:3)
致电:25.1.0 而非:23.4.0
你应该使用
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:support-v4:25.1.0'
和
compileSdkVersion 25
buildToolsVersion '25.0.1'
答案 1 :(得分:1)
答案 2 :(得分:0)
试试这个
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
...
targetSdkVersion 25
}
}