To have installed versions in android-studio above those of the project

1

I have installed in Android Studio the versions of Api Android 24 to 26, the topic that I have a project in hand that goes from 14 as a minimum to 24, the question is.

  

Should we select a specific API or does Android Studio take the   What better suits?

Greetings.

    
asked by CodeNoob 31.08.2017 в 19:23
source

2 answers

0
  

I have Android Api versions 24 installed in Android Studio   26,

That means you have installed these APIs:

  

I have a project in hand that goes from 14 as a minimum to 24

That is, you have defined in your project within your build.gradle :

minSdkVersion 14
targetSdkVersion 24
  

Should we select a specific one or already Android Studio take the one   better suit?

Actually you determine the configuration of your project in your file build.gradle , in this case define a minSdkVersion indicates from which API your application is supported and targetSdkVersion with which API your application is compiled, and it must be installed (see previous image).

In this case it is determined that your application can only work from android 4.0 since you have defined minSdkVersion 14 to any version, since you do not define a maxSdkVersion .

  • If your application is uploaded to Google Play, it will not appear to users with an operating system lower than Android 4.0 (API 14).

  • If you do not define minSdkVersion or maxSdkVersion you indicate that your application can be used by any operating system.

answered by 31.08.2017 / 20:31
source
0

Android Studio compiles the application project (or library) according to the information contained in the build.gradle file of your project. That's where you tell him how you want him to build your app at the compatibilities level.

Let's see an example of a build.gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.brightcrowns.app.miapp"
        minSdkVersion 15
        targetSdkVersion 26

...
  • compileSdkVersion 26 : indicates that it is compiled with SDK version 26. This is the SDK version you must have installed.
  • minSdkVersion 15 : indicates that the app should be able to run minimally on Ice Cream Sandwich (4.0-4.0.5)
  • targetSdkVersion 26 : indicates that it must have compatibility up to the Oreo version (8.0)

This means that the generated app will contain enough compatibility to run across the Android range from version 4.0 to 8.0 (the larger the range, the larger the generated apk, and also take into account some details of compatibility when programming).

I hope I have answered your question. Greetings!

    
answered by 31.08.2017 в 19:39