skip to Main Content

So i have been trying to run my project but i am encountering issues with com.google.android.material:material:1.10.0-alpha01 due to the "UpsideDownCake" API requirement.

This is the error message :

Dependency ‘com.google.android.material:material:1.10.0-alpha01’ requires libraries and applications that
depend on it to compile against codename "UpsideDownCake" of the
Android APIs.
:app is currently compiled against android-33.
Recommended action: Use a different version of dependency ‘com.google.android.material:material:1.10.0-alpha01’,
or set compileSdkPreview to "UpsideDownCake" in your build.gradle
file if you intend to experiment with that preview SDK.

Any help would be much appreciated.

2

Answers


  1. As described in their release notes for 1.10.0-alpha01, you need to use android-UpsideDownCake as compileSdkVersion in your app level build.gradle file.

    android {
        compileSdkVersion "android-UpsideDownCake"
        ...
    }
    

    However if you don’t really need to be on the alpha version, use the latest stable version instead:

    implementation("com.google.android.material:material:1.8.0")
    
    Login or Signup to reply.
  2. It works fine in this version:

    implementation 'com.google.android.material:material:1.8.0-alpha01'

    When I upgraded to the recommended new version, I was getting an error. After reviewing the log, I realized that I needed to upgrade compileSdkPreview for the new version to work correctly.

    enter image description here

    If you are going to use the new version, you should add the following.

    implementation 'com.google.android.material:material:1.10.0-alpha01'

    Make sure you download the SDK.

    enter image description here

    build.gradle(:app) you should update the value in the file as below:

    compileSdkVersion "android-UpsideDownCake"

    For detailed information, you can check: https://developer.android.com/about/versions/14/setup-sdk#kts

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