Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
301 views
in Technique[技术] by (71.8m points)

java - Blank screen after updating the Compilesdkversion from 27 to 29

i have updated my compileSdkversion from 27 to 29 and my app shows a blank screen i don't know why, when i reset it to sdk 27 it works fine and this is my build.gradle :

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.mai.xapkinstaller"
        minSdkVersion 17
        targetSdkVersion 29
        versionCode 98
        versionName "4.9"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.nononsenseapps:filepicker:4.1.0'
    testImplementation 'junit:junit:4.12'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.anko:anko-commons:$anko_version"
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.0.0'
    implementation 'com.facebook.android:audience-network-sdk:6.+'

}
repositories {
    mavenCentral()
}

i need to know what i have done wrong please help me with this issue i'm stuck for more than 48hours

question from:https://stackoverflow.com/questions/65875465/blank-screen-after-updating-the-compilesdkversion-from-27-to-29

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You use Support Library instead of AndroidX in your project.

When you change compileSdkversion/targetSDKversion from 27 to 29(or 30) you need to migrate AndroidX into your project.

(Why you need to migrate Androidx? Because the highest Support Library version is 28, but you want to use your app above 28.)

Here is some help how to migrate AndroidX into your project:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...