Rishab Parmar
Rishab Parmar

Reputation: 419

Android API not allowing application to be released on play store

I have just finished working with my android project and decided to publish it on Google Play Store. When I uploaded the signed APK file in the production tab of Google Play Console, I faced the following issue:enter image description here

Here is the gradle information:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.parma.torupee"
        minSdkVersion 26
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:design:26.1.0'
    compile 'com.jjoe64:graphview:4.2.1'
}

I have developed the application in Android Studio 3.0.1(did not update). I tried changing the targeted SDK to 29 but then I received errors for implementation 'com.android.support:appcompat-v7:26.1.0' and implementation 'com.android.support:design:26.1.0' lines in the gradle file.

How can I change the target SDK to 29 such that it supports the latest version and also support API level 26(Oreo)? Any help would be highly appreciated!

Upvotes: 0

Views: 733

Answers (2)

Saravinfotech
Saravinfotech

Reputation: 96

Compile SDK Version The Compile SDK Version is the version of Android in which you write code. If you choose 9, you can write code with all the APIs in version 28.

Minimum SDK Version Android operating system (OS) versions are backward-compatible. If your minSdkVersion is set to Android version 22, your application will run on Lolipop (5.1) and above .

Target SDK Version You should set the targetSdkVersion to the most recent version of Android that you have tested on.

Whenever a new version of Android comes out, you will want to update the targetSdkVersion to the latest Android version and test your app to fix any problems. If you don’t google may force you to update it. This allows you to use the new security patches commonly applied for most of the OS versions.

Increasing your target sdk doesnt affect the minimum version number you have defined.

EDITED : Updated comment on support library

If you want to update your target SDK to 28 then it might be easier as you could use the below support libraries

com.android.support:support-compat:28.0.0 but if you plan to use target sdk as 29 then you have to migrate all your support packages to androidx libraries .

https://developer.android.com/topic/libraries/support-library/packages

For easier migration you could follow the stesp give here https://developer.android.com/jetpack/androidx/migrate

Let me know if this helps

Upvotes: 2

Robert Pfeiffer
Robert Pfeiffer

Reputation: 11

You could use:

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:design:29.0.0'

Upvotes: -1

Related Questions