React-native-navigation: gradlew build failure: method does not override or implement a method from a supertype

Created on 17 Feb 2020  路  9Comments  路  Source: wix/react-native-navigation

Issue Description

I'm getting an error when trying to build the gradle project:

node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/ReloadHandler.java:3: error: ReloadHandler is not abstract and does not override abstract method onSuccess(NativeDeltaClient) in DevBundleDownloadListener public class ReloadHandler extends ReloadHandlerFacade implements JsDevReloadHandler.ReloadListener {

package com.reactnativenavigation.react;

public class ReloadHandler extends ReloadHandlerFacade implements JsDevReloadHandler.ReloadListener {

    private Runnable onReloadListener = () -> {};

    public void setOnReloadListener(Runnable onReload) {
        this.onReloadListener = onReload;
    }

    @Override
    public void onReload() {
        onReloadListener.run();
    }

    @Override
    public void onSuccess() {
        onReloadListener.run();
    }

    public void destroy() {
        onReloadListener = null;
    }
}

The same thing happens another two times

node_modules/react-native-navigation/lib/android/app/src/reactNative62/java/reactnativenavigation/react/DevBundleDownloadListenerAdapter.java:7: error: DevBundleDownloadListenerAdapter is not abstract and does not override abstract method onSuccess(NativeDeltaClient) in DevBundleDownloadListener

package com.reactnativenavigation.react;

import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener;

import javax.annotation.Nullable;

public class DevBundleDownloadListenerAdapter implements DevBundleDownloadListener, NavigationDevBundleDownloadListener {
    @Override
    public void onSuccess() {
        onSuccess();
    }

    @Override
    public void onProgress(@Nullable String status, @Nullable Integer done, @Nullable Integer total) {

    }

    @Override
    public void onFailure(Exception cause) {

    }
}

node_modules/react-native-navigation/lib/android/app/src/reactNative62/java/reactnativenavigation/react/ReloadHandlerFacade.java:8: error: method does not override or implement a method from a supertype

package com.reactnativenavigation.react;

import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener;

import javax.annotation.Nullable;

public abstract class ReloadHandlerFacade implements DevBundleDownloadListener {
    @Override
    public void onSuccess() {

    }

    @Override
    public void onProgress(@Nullable String status, @Nullable Integer done, @Nullable Integer total) {

    }

    @Override
    public void onFailure(Exception cause) {

    }
}

This is DevBundleDownloadListener in react-native:

package com.facebook.react.devsupport.interfaces;

import androidx.annotation.Nullable;
import com.facebook.react.bridge.NativeDeltaClient;

public interface DevBundleDownloadListener {
  void onSuccess(@Nullable NativeDeltaClient nativeDeltaClient);

  void onProgress(@Nullable String status, @Nullable Integer done, @Nullable Integer total);

  void onFailure(Exception cause);
}

This is my app/build.gradle:

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
        ...
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        missingDimensionStrategy "RNN.reactNativeVersion", "reactNative60"
        versionCode 1
        versionName "1.0"
        multiDexEnabled true // This is for method limit
    }

Environment

  • React Native Navigation version: 4.8.4
  • React Native version: 0.61.2
  • Platform(s) (iOS, Android, or both?): Android API 28
  • Device info: AVD Nexus_5X_API_29_x86 simulator
馃彋 stale

Most helpful comment

Could you guys try to update RNN to the latest and remove a line in build.gradle:
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative60"

All 9 comments

me too v6.0.0

Has anyone solved the problem?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

same issue here

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

The issue has been closed for inactivity.

Getting this issue now. Anyone solve this?

Same here.

Could you guys try to update RNN to the latest and remove a line in build.gradle:
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative60"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kiroukou picture kiroukou  路  3Comments

ghost picture ghost  路  3Comments

EliSadaka picture EliSadaka  路  3Comments

yedidyak picture yedidyak  路  3Comments

bdrobinson picture bdrobinson  路  3Comments