skip to Main Content

I have this issue when compiling my project in Android Studio:

     Dependency 'androidx.appcompat:appcompat-resources:1.6.1' requires 
     libraries and applications that
     depend on it to compile against version 33 or later of the
     Android APIs.

     :app is currently compiled against android-32.

     Also, the maximum recommended compile SDK version for Android Gradle
     plugin 7.2.1 is 32.

     Recommended action: Update this project's version of the Android Gradle
     plugin to one that supports 33, then update this project to use
     compileSdkVerion of at least 33.

     Note that updating a library or application's compileSdkVersion (which
     allows newer APIs to be used) can be done separately from updating
     targetSdkVersion (which opts the app in to new runtime behavior) and
     minSdkVersion (which determines which devices the app can be installed
     on).

How can I fix this issue? I’m not sure what I should do.

3

Answers


  1. This is a dependency version contrast issue just replace your appcompact and ktx with these

    implementation 'androidx.core:core-ktx:1.8.0'
    implementation 'androidx.appcompat:appcompat:1.4.2'
    
    Login or Signup to reply.
  2. File -> Project Structure -> Depencencies -> Modules -> app -> Dependency

    Find appcompat and change Requested Version to 1.5.1

    IDEA project structure

    That worked for me.

    Login or Signup to reply.
  3. Upgrade your compileSdk and targetSdk to 33

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