Error opening demo flutter_app on my phone

I am new in the Flutter word, just started reading book Flutter Apprentice and coding along.
Being stuck in Chapter 1 - 1.7 Trying it out - The template project.
I have tried to run demo fluter_app on my mobile phone (didn’t change anything in code) and application crash on startup when I try to open it on my phone.
As I said, I am new in this technology and I am not sure how to debug this problem, only trace I have is following error in Android Studio:

[ERROR:flutter/fml/platform/android/] java.lang.SecurityException: Permission Denial: broadcast from android asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
E/flutter (18820): at android.os.Parcel.readException(
E/flutter (18820): at android.os.Parcel.readException(
E/flutter (18820): at$Stub$Proxy.reportActivityFullyDrawn(
E/flutter (18820): at
E/flutter (18820): at
E/flutter (18820): at$1.onFlutterUiDisplayed(
E/flutter (18820): at$2.onFlutterUiDisplayed(
E/flutter (18820): at io.flutter.embedding.engine.FlutterJNI.onFirstFrame(
E/flutter (18820): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (18820): at
E/flutter (18820): at android.os.Looper.loop(
E/flutter (18820): at
E/flutter (18820): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (18820): at$
E/flutter (18820): at
E/flutter (18820):
F/flutter (18820): [FATAL:flutter/shell/platform/android/] Check failed: fml::jni::CheckException(env).
F/libc (18820): Fatal signal 6 (SIGABRT), code -6 in tid 18820 (ple.flutter_app)

I don’t know is this related to crash on my phone and how to solve it?

Solved by changing meta-data tag inside AndroidManifest.xml:

<meta-data android:name="" android:resource="@drawable/launch_background" />

@stvu Glad you already solved.

Doc says that meta-tag shouldn’t be needed anymore Adding a splash screen to your mobile app | Flutter

So I wonder, are you running Flutter 2.5?

> flutter doctor

in terminal to find out.

I am running Flutter 2.5.2

I will re-test later, to check will it work without meta-data tag.

To summarize, by default following meta-data was defined (doesn’t work):


I replaced it with following (work fine):

<meta-data android:name="" android:resource="@drawable/launch_background" />

Without meta-data (to test):

1 Like

Considering you are running code generated by the create command in this chapter, I wonder if this an issue with Flutter itself.
A quick look at the GitHub issues didn’t lead me anywhere so far.
Let us know if you find something new. We’d like to “fix” this in future releases of the book.

Yes, code generated by the create command…
Just tested without meta-data tag, it doesn’t work.
Also crashes.

Used mobile phone: Samsung Galaxy S7 (SM-G930F)

But when using meta-data tag, I am getting following warning message:
W/FlutterActivityAndFragmentDelegate(15046): A splash screen was provided to Flutter, but this is deprecated. See for migration steps.