I recently updated the flutter. For running flutter project I am using android via usb. And after updating every project on startup shows black screen. Previous version worked fine. I tried to change launch splash screen(drawable/launch_background.xml
) in android to white but black screen shows after splash screen.
This is the simple code I am trying to run
void main()=> runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context){
return MaterialApp(
home:MyHomePage(),
);
}
}
So how can I remove black screen on startup?
The black screen like here. As I said black screen shows after updating flutter to a new version. And I downgraded the flutter version to old and black screen disappeared.
I had the same problem when I switched to beta channel of flutter.
I noticed there is another launch_background.xml
file in drawable-v21
folder.
so I copied the content of launch_background.xml
in drawable
folder to launch_background.xml
in drawable-v21
and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With