Android Studio已自动更新以下组件到API 26:
- ROM - SDK至API 26
- Android SDK构建工具 26
- Android模拟器 26.0.3
- Android SDK平台工具 26.0.0
- Android SDK工具 26.0.2
我的Gradle版本为2.3.3:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "com.mycompany.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 4
versionName "0.0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
/////////If I change it to 26.0.0 it gives errors.///////////
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
/////////////////////////////////////////////////////////////
testCompile 'junit:junit:4.12'
}
我有两个问题(请参见 Gradle 的注释行):
1.如何知道这些库的最新版本(我只是随机输入数字并尝试更新它们,直到找到最新版本)。
2.在排除组中有'com.android.support',如果我删除它,是否需要指定那些库?我看到许多人都是以这种方式包括'com.android.support'库,所以肯定有理由这样做。
我在 developer.android.com 中搜索后发现最新版本为24.2.0(非常旧了,我一直在使用25.3.1)。