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

Created on 1 Sep 2016  路  15Comments  路  Source: facebook/react-native

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.

Locked

Most helpful comment

Closing this since it was fixed.

All 15 comments

i have the same problem. have you solved?

I have this problem too.

It seems that this error occurs only on Meizu devices, My code run well on simulator.

I'm still have no solution for this :(
I think we need sombody from RN developers to solve this problem.

I have the same problem when I upgrade 0.33 from 0.31

It's also on 0.34.RC.0.

I have the same problem

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.

@janicduplessis this problem seems still exist on v0.34.0-rc.0.

It should be irrelevant with the RN, most likely the Flyme OS extends the official ScrollView (for bouncing?) I don't have a device by Meizu to verify though.

You can contact some Flyme OS developers to investigate this issue: https://github.com/flymeOS.

cc @duanqz

@nihgwu but version 0.31 is ok, so i think it could be modify something what cause this problem

@zackteng then you can compare the branches to locate the commit which result this regression, since witch release

Closing this since it was fixed.

mark

Was this page helpful?
0 / 5 - 0 ratings