Answer the question
In order to leave comments, you need to log in
Will there be any problems if you leave compileSdkVersion 28 in gradle, but change targetSdkVersion to 29?
I wanted to publish a New Year's update for my application, but it turned out that the targetSdkVersion should be 29. O'k. First, I did everything on the recommendation of android studio, i.e. changed compileSdkVersion to 29 too and put buildToolsVersion 29.0.0. And then the refactor->migrate to androidx, but at the same time I caught a bunch of errors, which I sort of coped with. The studio does not swear, and when I compile a signed aab, Google Play writes that the signature is invalid. Then I compiled apk by checking the necessary checkboxes (googled it). Everything seems to be in order, but the application is successfully installed and does not start (apparently there are some errors in the xml, which the studio is silent about). Then I tried to leave everything as in previous versions, changing only the targetSdkVersion to 29. Everything looks okay: Google Play accepts, does not swear at the signature, and the application starts.
Here is the code from gradle:
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 28
defaultConfig {
applicationId "com.my.project"
minSdkVersion 19
//noinspection OldTargetApi
targetSdkVersion 29
versionCode 13
versionName "12.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion = '28.0.3'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
//noinspection GradleDependency
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
//noinspection GradleDependency
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
//noinspection GradleDependency
implementation 'com.android.support:design:28.0.0-alpha3'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.android.support:exifinterface:28.0.0'
}
apply plugin: 'com.google.gms.google-services'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question