How to change minSdkVersion on Android

Asked

Viewed 858 times

1

I’m having some problems running on my real device.

inserir a descrição da imagem aqui

This is on top is my device, and this on the bottom are the settings of my project.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "br.com.softblue.android"
        minSdkVersion 21
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        debug{
            debuggable true
        }

    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

How do I change this setting to reality on my real device?

  • minSdkVersion is in the configuration file of the Android application, is Androidmanifest.xml.

1 answer

4


In your project is set the minimum version as 21
minSdkVersion 21
Your device is Android 4.1.2 (API 16) right?
Then change your minSdkVersion to 16.

   defaultConfig {
        applicationId "br.com.softblue.android"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.