Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android new splash screen deprecation warning #199

Closed
Macacoazul01 opened this issue Aug 19, 2021 · 4 comments
Closed

Android new splash screen deprecation warning #199

Macacoazul01 opened this issue Aug 19, 2021 · 4 comments

Comments

@Macacoazul01
Copy link

Since flutter 2.5.0 this new warning appears on the console:
A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.

I don't if it's related to the way the package implements the splash screen or not

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 2.5.0-7.0.pre.156, on Microsoft Windows [versão 10.0.19043.1165], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.2)
[√] VS Code (version 1.59.0)
[√] Connected device (3 available)

• No issues found!

@benjaminhorner
Copy link

I believe this indicates that from now on, Flutter handles showing the native screen UNTIL all dart/flutter stuff has been initialized rendering the "in between" splash screen useless for Android…

https://flutter.dev/docs/development/ui/advanced/splash-screen#migrating-from-manifest--activity-defined-custom-splash-screens

@APPXOTICA
Copy link

I see this message too

@jonbhanson
Copy link
Owner

This message is not related to this package, but is related to a change in how Flutter handles splash screens in Flutter 2.5, as mentioned by @benjaminhorner . It is caused by having the following code in your AndroidManifest.xml, which was included by default in previous versions of Flutter:

            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />

The solution is to remove the above code.

@benjaminhorner
Copy link

I think this issue can be closed as the solution posted by @jonbhanson solves it. Also, as noted, this is not related to this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants