react-native: [Android] com.meizu.widget.OverScrollerExt cannot be cast to android.widget.OverScroller

Hi, I have a problem with my app on Meizu MX2 (Android 4.4.4).

After my app launches and I’m trying to open menu or do any other action in my app, I’ve got this error:

s60901-104703

It’s in debug mode, in release mode my app just silently crashes.

I googled a lot and here are the things I have tried:

  • add android:overScrollMode="never" to maps.xml:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    android:overScrollMode="never"
    ... />

It doesn’t helps.

  • add the following to styles.xml:
<resources>
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:overScrollMode">never</item>
        <item name="android:listViewStyle">@style/Widget.AppTheme.ListView</item>
        <item name="android:scrollViewStyle">@style/Widget.AppTheme.ScrollView</item>
    </style>

    <style name="Widget.AppTheme.ListView" parent="android:Widget.ListView">
        <item name="android:overScrollMode">never</item>
    </style>

    <style name="Widget.AppTheme.ScrollView" parent="android:Widget.ScrollView">
        <item name="android:overScrollMode">never</item>
    </style>
</resources>

It doesn’t helps.

Maybe someone can help me.

There is custom firmware installed by default on Meizu phones - Flyme OS (on MX2 it’s Flyme OS 4.2.8.2i). I think the problem is connected with it.

I’m using RN 0.33.0.RC.0, MacOS 10.11.6.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Closing this since it was fixed.

Same issue.

No time to wait for official update. Workaround for me is to privide a fixed ReactScrollView to my front-end team.

Fix is something like this:

        if (sScrollerField != null) {
            try {
                Object scroller = sScrollerField.get(this);
                if (scroller instanceof OverScroller) {
                    mScroller = (OverScroller) scroller;
                } else {
                    mScroller = null;
                }
            } catch (IllegalAccessException e) {
                throw new RuntimeException("Failed to get mScroller from ScrollView!", e);
            }
        } else {
            mScroller = null;
        }

Tested on several Meizu devices and just worked well. Waiting for the official update.