Skip to content

"W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1" warnings keep filling the terminal #174783

Description

@pandruz

Steps to reproduce

When I use a normal GestureDetector I get my terminal filled with warnings on the motion event, such as this:

W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1

Expected results

I expect the touch events of the GestureDetector to not trigger any warning

Actual results

I get spammed with the following warning whenever I touch the GestureDetector:

W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1

Code sample

Code sample

The code needed to reproduce this error is a simple StatefulWidget with a single GestureDetector button:

class TestGraphics extends StatefulWidget {
  const TestGraphics({super.key});

  @override
  State<TestGraphics> createState() => _TestGraphicsState();
}

class _TestGraphicsState extends State<TestGraphics> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          GestureDetector(
            onTap: () {
              print("TEST");
            },
            child: Container(color: Colors.amber, width: 100, height: 100),
          ),
         ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
W/MotionEvent-JNI(11414): android_view_MotionEvent_nativeGetPointerCount: -1
I/flutter (11414): TEST

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.35.2, on macOS 15.6.1 24G90 darwin-arm64, locale it-IT) [681ms]
    • Flutter version 3.35.2 on channel stable at /Users/andrearizzo/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 05db968908 (7 giorni fa), 2025-08-25 10:21:35 -0700
    • Engine revision a8bfdfc394
    • Dart version 3.9.0
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [4,3s]
    • Android SDK at /Users/andrearizzo/Library/Android/sdk
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • ANDROID_SDK_ROOT = /Users/andrearizzo/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [1.459ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [12ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2025.1) [12ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[✓] VS Code (version 1.103.2) [9ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Network resources [292ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectf: gesturesflutter/packages/flutter/gestures repository.frameworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions