Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] com.meizu.widget.OverScrollerExt cannot be cast to android.widget.OverScroller #9697

Closed
alexHlebnikov opened this issue Sep 1, 2016 · 15 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@alexHlebnikov
Copy link

alexHlebnikov commented Sep 1, 2016

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.

@alexHlebnikov alexHlebnikov changed the title [Android] com.meizu.widget.OversScrollerExt cannot be cast to android.widget.Overscroller [Android] com.meizu.widget.OverScrollerExt cannot be cast to android.widget.OverScroller Sep 1, 2016
@zhouzefei
Copy link

i have the same problem. have you solved?

@sidgwick
Copy link

I have this problem too.

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

@alexHlebnikov
Copy link
Author

alexHlebnikov commented Sep 12, 2016

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

@wooter-s
Copy link

I have the same problem when I upgrade 0.33 from 0.31

@alexHlebnikov
Copy link
Author

It's also on 0.34.RC.0.

@zackteng
Copy link

I have the same problem

@kyangc
Copy link

kyangc commented Sep 18, 2016

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.

@zackteng
Copy link

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

@nihgwu
Copy link
Contributor

nihgwu commented Sep 18, 2016

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.

@leeight
Copy link
Contributor

leeight commented Sep 18, 2016

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

cc @duanqz

@zackteng
Copy link

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

@nihgwu
Copy link
Contributor

nihgwu commented Sep 18, 2016

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

@leeight
Copy link
Contributor

leeight commented Sep 19, 2016

It was fixed by this commit: 5deb528

@janicduplessis
Copy link
Contributor

Closing this since it was fixed.

@future-c
Copy link

mark

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests