6

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?

  • "I'm using the latest Android Studio Preview" -- Dolphin? The [release notes mentions problems with Chipmunk](https://developer.android.com/about/versions/13/release-notes?hl=en#ki-studio-tools-dp1), though in a slightly different scenario. – CommonsWare Feb 14 '22 at 14:06
  • I'm using Dolphin too, but when I change `compileSdkVersion` and `targetSdkVersion` to `"Tiramisu"`, I got the above error. And it's not about generating signed Apk, the error happens during the build. –  Feb 14 '22 at 14:10
  • Did you try using "android-T"? – fillobotto Feb 14 '22 at 14:33
  • @fillobotto Tried `T` instead of `Tiramisu`, it doesn't work too. –  Feb 14 '22 at 14:35
  • No, I mean the whole "android-T" string. When Q and S SDSs were still previews, we had to use "android-Q" or "android-S" – fillobotto Feb 14 '22 at 14:39
  • @fillobotto I got this `Failed to find Platform SDK with path: platforms;android-T` - note that I already installed Android SDK Platform Tiramisu. –  Feb 14 '22 at 14:42
  • 1
    Try "android-Tiramisu" – Nickolay Savchenko Feb 14 '22 at 22:59
  • 1
    @NickolaySavchenko `android-Tiramisu` is working great. Please post an answer and I will accept it. Thank you for your help. –  Feb 14 '22 at 23:26
  • 1
    @nnhthuan feel free to accept your own answer:) For future Android releases you can open Android sdk folder and see names in `platforms` dir. – Nickolay Savchenko Feb 16 '22 at 00:18

2 Answers2

12
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.

-2

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"

saad aziz
  • 9
  • 1
  • 1
    That's what we already discussed above. And it was the first answer by @NickolaySavchenko . Do not attempt to still the answer, it's not good at all. I'm waiting for him to officially answer here to accept it. –  Feb 15 '22 at 06:05
  • wow .. didn't see that coming .. by the way its not still its steal .. – saad aziz Feb 15 '22 at 06:33