使用哪个SDK

时间:2017-07-19 07:47:49

标签: android api sdk

我做了一个应用,但我不知道我必须在build.gradle文件中指定哪个SDK,如果我理解我选择的SDK是可以支持所有库和功能的SDK我的应用程序,但如何知道SDK?

这是我的app gradle文件:

apply plugin: 'com.android.application'
apply plugin: 'ormgap'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "xxx"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 13
        versionName "1.3"
    }
    signingConfigs {
        release {
            storeFile file("xxx.jks")
            storePassword "xxx"
            keyAlias "xxx"
            keyPassword "xxx"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        repositories {
            maven { url 'http://ksoap2-android.googlecode.com/svn/m2-repo' }
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/ksoap2-android-assembly-3.6.1-jar-with-dependencies.jar')
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
}

我也有错误:

with: compile 'com.android.support:appcompat-v7:23.0.0'
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 23.0.0, 22.0.0. Examples include com.android.support:appcompat-v7:23.0.0 and com.android.support:mediarouter-v7:22.0.0 less... (Ctrl+F1)  There are some combinations of libraries, or tools and libraries, that
> are incompatible, or can lead to bugs. One such incompatibility is
> compiling with a version of the Android support libraries that is not
> the latest version (or in particular, a version lower than your
> targetSdkVersion.)

AND

buildToolsVersion" 23.0.0"

Build Tools 23.0.0 should not be used; it has some known serious bugs. Use version 23.0.3 instead. less... (Ctrl+F1)
> There are some combinations of libraries, or tools and libraries, that
> are incompatible, or can lead to bugs. One such incompatibility is
> compiling with a version of the Android support libraries that is not
> the latest version (or in particular, a version lower than your
> targetSdkVersion.)

0 个答案:

没有答案