react-native-media-kit icon indicating copy to clipboard operation
react-native-media-kit copied to clipboard

Build fails on Latests release

Open JABirchall opened this issue 6 years ago • 4 comments

:react-native-media-kit:compileReleaseJavaWithJavac
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:95: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:111: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:127: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:143: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:159: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:175: error: no suitable constructor found for Event(int,long)
                .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                               ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
/Users/jbirchall/Documents/projects/app/node_modules/react-native-media-kit/android/src/main/java/com/greatdroid/reactnative/media/player/ReactMediaPlayerViewManager.java:193: error: no suitable constructor found for Event(int,long)
                  .dispatchEvent(new Event(view.getId(), SystemClock.uptimeMillis()) {
                                 ^
    constructor Event.Event() is not applicable
      (actual and formal argument lists differ in length)
    constructor Event.Event(int) is not applicable
      (actual and formal argument lists differ in length)
7 errors
:react-native-media-kit:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Using:

  • React-native: 0.41.2
  • react-native-media-kit: 0.0.14

JABirchall avatar Jul 14 '17 10:07 JABirchall

Just delete SystemClock.uptimeMillis() from the method parameter list

new Event(view.getId())

If you go to the Event declaration you will see that that there is only one parameter to be passed to the class constructor

protected Event(int viewTag) {
   init(viewTag);
}

and the timestamp is assigned in the init function

protected void init(int viewTag) {
    mViewTag = viewTag;
    mTimestampMs = SystemClock.uptimeMillis();
    mInitialized = true;
 }

NOTE: Is is NOT enough to know Javascript alone to do mobile development!

dittmarconsulting avatar Jul 18 '17 02:07 dittmarconsulting

maybe open a PR to get this fixed?

emroot avatar Aug 01 '17 21:08 emroot

NOTE: Is is NOT enough to know Javascript alone to do mobile development!

As a company we do not change extension core code. If it doesn't work, we wont do a hacky internal fix and pass it around. As everyone would then have a different version and the build server would never have that version leading to build failures.

JABirchall avatar Aug 02 '17 13:08 JABirchall

Same issues I am facing with latest build

paraswatts avatar Sep 20 '17 03:09 paraswatts