S
S
Stanislav Korolevskiy2017-11-12 11:11:38
Android
Stanislav Korolevskiy, 2017-11-12 11:11:38

How to allow application to run on Lollipop 5.0 and above versions?

I want to install the minimum version to run the application - Lollipop 5.0. How to properly configure everything so that the application runs without errors on all higher versions? Now the compiler swears at Material features. Need to change buildToolsVersion?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "com.ralpalette.ral"
        minSdkVersion 21
        targetSdkVersion 21
        versionCode 1
        versionName "1.0.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:21.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'

    //Add Library
    compile 'com.github.ceryle:SegmentedButton:v1.2.2'
    compile 'com.google.code.gson:gson:2.4'
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-11-12
@korolevsky_s

Set target and compile 26.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question