Ezequiel Allio Ezequiel Allio - 3 months ago 10
Android Question

Android application compatibility with old APIs

I created an app with the API 22 and I want to know if is necessary create a new project to make it compatible with the previous versions (for example with the API 19) or if I can do something simpler and efficient

Answer

If you're using gradle just set the minSdkVersion to the number you'd like to use:

defaultConfig {
    applicationId "com.example.mypackage"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}

in the app's build.gradle file