"Unsupported value: Tiramisu" while I try to set up the Android 13 SDK

Viewed 2307

I followed this page: https://developer.android.com/about/versions/13/setup-sdk to set up Android 13 SDK.

In my build.gradle:

android {
    compileSdkVersion("Tiramisu")

    defaultConfig {
        targetSdkVersion("Tiramisu")
    }
}

Then I got the error:

> Unsupported value: Tiramisu. Format must be one of:
  - android-31
  - android-31-ext2
  - android-T
  - vendorName:addonName:31

I tried to use "33" instead of "Tiramisu", but it's not working. I'm using the latest Android Studio Preview as the instruction.

Is there anyone trying to use Android 13 SDK?

2 Answers
This answer is no longer valid because you can use API version 33 now for Tiramisu as it's officially released

Credit to @NickolaySavchenko - Posting this answer since I've been waiting for him for a day.

Finally, after taking advice from @NickolaySavchenko - I have a final working code like this.

compileSdkVersion "android-Tiramisu"
targetSdkVersion "Tiramisu"

Yes, you see it correctly, the targetSdkVersion is Tiramisu, not android-Tiramisu so that it can run in an emulator API Tiramisu device.

I tested and can confirm that minSdkVersion doesn't need to change to android-Tiramisu or Tiramisu. I'm still keeping it as 19 and it's working great.

As @NickolaySavchenko said compileSdkPreview "android-Tiramisu" targetSdkPreview "android-Tiramisu" working fine

and to run it on android 13 you also need to change your minSdk to "android-Tiramisu"

Related