skip to Main Content

today i have update my android studio version Android Studio Dolphin | 2021.3.1 then i got an issue.

like xml preview are not showing.

and suggestion not found in xml and java class

Image

2

Answers


  1. 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'
    
    Login or Signup to reply.
  2. You have to upgrade to latest AGP version, you can do it manually or using upgrade assistant as shown below. You can find in view->tools->upgrade assistant.

    Step 1

    Step 2

    Step 3

    On clicking on run selecting steps, it will start upgrading to latest AGP.

    Final Step

    Sync gradle

    if it doesn’t work you need to reopen your project or restart android studio.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search