A
A
Alex Ivanov2019-11-19 01:07:59
Android
Alex Ivanov, 2019-11-19 01:07:59

android studio. How to increase the SDK version on an old project?

Hello. there is an old project that I did on 24 SDK. When you try to upload it to Google playmarket, you get an error that at least the 28th is needed. I tried to change it through the Project Settings, but it doesn't work. This is what duild.gradle looks like now

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.3'
    defaultConfig {
        applicationId "com.play.mediki"
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 1
        versionName "1.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:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
    compile 'com.google.android.gms:play-services-ads:11.0.4'
    testCompile 'junit:junit:4.12'
}

When changing targetSdkVersion 24 to targetSdkVersion 28, it swears at the lines
compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'

Tell me how to get out of the situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AndroidRS, 2019-11-19
@Protossan

You need to migrate from support library to AndroidX (because support library is no longer supported) and targetSdkVersion 28 accordingly
https://developer.android.com/topic/libraries/supp...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question