cesardeazevedo / react-native-nested-scroll-view

react-native wrapper for android NestedScrollView
MIT License
88 stars 36 forks source link

Issue with react native 0.57.x #31

Closed otaviogaiao closed 5 years ago

otaviogaiao commented 5 years ago

Hello. I have been using your lib with my app on react native 0.56. It works flawless, however, after upgrading to react native 0.57, it doesn't work anymore. My android app doesn't even build.

I get the following error when running react-native run-android:

> Task :react-native-nested-scroll-view:compileDebugJavaWithJavac FAILED
/Users/otaviogaiao/Projetos/citsmart/citsmart-itsm-mobile-field-service/node_modules/react-native-nested-scroll-view/android/src/main/java/com/rnnestedscrollview/ReactNestedScrollViewManager.java:238: error: method getJSEventName in enum ScrollEventType cannot be applied to given types;
        .put(ScrollEventType.MOMENTUM_END.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollEnd"))
                                         ^
  required: ScrollEventType
  found: no arguments
  reason: actual and formal argument lists differ in length
/Users/otaviogaiao/Projetos/citsmart/citsmart-itsm-mobile-field-service/node_modules/react-native-nested-scroll-view/android/src/main/java/com/rnnestedscrollview/ReactNestedScrollViewManager.java:237: error: method getJSEventName in enum ScrollEventType cannot be applied to given types;
        .put(ScrollEventType.MOMENTUM_BEGIN.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollBegin"))
                                           ^
  required: ScrollEventType
  found: no arguments
  reason: actual and formal argument lists differ in length
/Users/otaviogaiao/Projetos/citsmart/citsmart-itsm-mobile-field-service/node_modules/react-native-nested-scroll-view/android/src/main/java/com/rnnestedscrollview/ReactNestedScrollViewManager.java:236: error: method getJSEventName in enum ScrollEventType cannot be applied to given types;
        .put(ScrollEventType.END_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollEndDrag"))
                                     ^
  required: ScrollEventType
  found: no arguments
  reason: actual and formal argument lists differ in length
/Users/otaviogaiao/Projetos/citsmart/citsmart-itsm-mobile-field-service/node_modules/react-native-nested-scroll-view/android/src/main/java/com/rnnestedscrollview/ReactNestedScrollViewManager.java:235: error: method getJSEventName in enum ScrollEventType cannot be applied to given types;
        .put(ScrollEventType.BEGIN_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollBeginDrag"))
                                       ^
  required: ScrollEventType
  found: no arguments
  reason: actual and formal argument lists differ in length
/Users/otaviogaiao/Projetos/citsmart/citsmart-itsm-mobile-field-service/node_modules/react-native-nested-scroll-view/android/src/main/java/com/rnnestedscrollview/ReactNestedScrollViewManager.java:234: error: method getJSEventName in enum ScrollEventType cannot be applied to given types;
        .put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
                                   ^
  required: ScrollEventType
  found: no arguments
  reason: actual and formal argument lists differ in length
5 errors

I have no knowledge of java native code, so I can't figure it out on my own.

Any help is appreciated.

cesardeazevedo commented 5 years ago

Indeed, i didn't tested with 0.57 yet, i am going to need some time to rebase with the latest version of react-native, they probably did some changes on the ScrollEventType.

otaviogaiao commented 5 years ago

got it. I will take a look at it, although I don't know if I will be able to do anything haha

yasir-netlinks commented 5 years ago

for me it can build fine but im not able to scroll anymore

yasir-netlinks commented 5 years ago

Hi there, any updates on this!

cesardeazevedo commented 5 years ago

Released at 8.0.0

PierreCapo commented 5 years ago

Hi, I still got this error on RN 0.57.1 and the 8.0.0 version :(

yasir-netlinks commented 5 years ago

Hi, I updated to version 8.0.0 and im getting similar error. @PierreCapo have you been able to fix it! This lib worked like a charm on 0.56 but now Im stuck, need help please whether this is going to be fixed or not

PierreCapo commented 5 years ago

@yasir-netlinks I haven't been able to fix it but I figured that there was a nestedScrollEnabled property available in the React Native API : https://facebook.github.io/react-native/docs/scrollview#nestedscrollenabled .The only downside is that it breaks compatibility for Android 4 support (which wasn't a big problem for my use case, so I haven't tried to use this lib again.