chrisfisher / react-native-directed-scrollview

UNMAINTAINED- see below. A natively implemented scrollview component which lets you specify different scroll directions for child content.
MIT License
149 stars 67 forks source link

Error compileDebugJavaWithJavac FAILED on Android #49

Closed mapacheverdugo closed 5 years ago

mapacheverdugo commented 5 years ago

First of all, I really loved your component, it's exactly what I was looking for.

But I'm a bit noob with React Native, and following the installation instructions and trying to compile on my physical Android device, the process is interrupted and throws the following error:

> Task :react-native-directed-scrollview:compileDebugJavaWithJavac FAILED
/Users/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java:68: 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/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java:67: 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/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java:66: 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/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java:65: 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/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java:64: 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
Note: /Users/jorgeverdugo/Projects/mi-utem/node_modules/react-native-directed-scrollview/android/src/main/java/com/rnds/DirectedScrollViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-directed-scrollview:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

I have no idea what to do, so I would appreciate if you could help me

Evgenyx82 commented 5 years ago

Same here.

mapacheverdugo commented 5 years ago

I was looking at the other issues and I found this: #48 that modifies the code just in the file that shows the error. I tried undoing this changes in local and it worked, so I opened a pull request #51 to revert the changes.

Evgenyx82 commented 5 years ago

@mapacheverdugo, yep, confirm... your fork works as expected.