定义项目 SDK 版本

在主模块( app )的 build.gradle 文件中,定义最小和目标版本号。

android {
    //the version of sdk source used to compile your project
    compileSdkVersion 23

    defaultConfig {
        //the minimum sdk version required by device to run your app
        minSdkVersion 19
        //you normally don't need to set max sdk limit so that your app can support future versions of android without updating app
        //maxSdkVersion 23
        //
        //the latest sdk version of android on which you are targeting(building and testing) your app, it should be same as compileSdkVersion
        targetSdkVersion 23
    }
}