Home > database >  After Update my Android Studio (Dolphin | 2021.3.1), XML Layout Preview Can't showing
After Update my Android Studio (Dolphin | 2021.3.1), XML Layout Preview Can't showing

Time:10-13

Version Information:

Android Studio Dolphin | 2021.3.1

Build #AI-213.7172.25.2113.9014738, built on September 1, 2022

Runtime version: 11.0.13 0-b1751.21-8125866 amd64

CodePudding user response:

For anyone is facing this issue, i solved it by update gradle version and buildtool, because new android studio seem not work with older version which our project is using.

update buildToolVersion to 7.3.0 in buildSrc/src/main/kotlin/Dependencies.kt

object BuildPlugins {
    object Versions {
        const val buildToolVersion = "7.3.0" //lower version seem not work

and change to 7.4 in gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip

hope this can help

CodePudding user response:

Downgrard your project into build.gradle [app level] Change your targetSdk and compileSdk 33 to 32, and downgrade your library...

Change minSdk atleast 21

android{

    compileSdk 32

    defaultConfig {
       minSdk 21
       targetSdk 32
       ...
    }
...
}

And

Use this versions of librarys ...

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4. '
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  • Related