skip to Main Content

Why do I get this warning when I try to create my custom splash screen?
Warning Screenshot

Can I get rid of this without using @SuppressLint("CustomSplashScreen")

2

Answers


  1. Probably because with android-12 there is a new API to build Splash Screen . You can go through the migration guide if you want to implement new API . If you want keep older one you have to use @SupressLint because you are targeting android-12.

    Login or Signup to reply.
  2. Why do I get this warning when I try to create my custom splash screen?

    You are encouraged to migrate to the SplashScreen API that is available on Android 12, with a backport available in AndroidX libraries (currently alpha).

    Can I get rid of this without using @SuppressLint("CustomSplashScreen")

    There are some other ways to suppress lint warnings such as using an XML file or configuring it with gradle. In this case I’d prefer the @SuppressLint annotation since it’s the most local.

    Or, just get rid of your custom splash screen to keep lint happy here.

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