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
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"
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.
Yes, you see it correctly, the
targetSdkVersion
isTiramisu
, notandroid-Tiramisu
so that it can run in an emulator API Tiramisu device.I tested and can confirm that
minSdkVersion
doesn’t need to change toandroid-Tiramisu
orTiramisu
. I’m still keeping it as19
and it’s working great.