React-native-navigation: [v2] [android] [failing build] Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED

Created on 17 Sep 2018  路  7Comments  路  Source: wix/react-native-navigation

Android build is failing

> Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED
/Users/michaljarnot/IdeaProjects/react-native-redux-wix-navigation/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java:10: error: cannot find symbol
import com.facebook.react.uimanager.UIImplementationProvider;
                                   ^
  symbol:   class UIImplementationProvider
  location: package com.facebook.react.uimanager
/Users/michaljarnot/IdeaProjects/react-native-redux-wix-navigation/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java:23: error: cannot find symbol
    public static class Provider extends UIImplementationProvider {
                                         ^
  symbol:   class UIImplementationProvider
  location: class SyncUiImplementation
/Users/michaljarnot/IdeaProjects/react-native-redux-wix-navigation/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactNativeHost.java:86: error: cannot find symbol
                .setUIImplementationProvider(getUIImplementationProvider())
                                             ^
  symbol:   method getUIImplementationProvider()
  location: class NavigationReactNativeHost
/Users/michaljarnot/IdeaProjects/react-native-redux-wix-navigation/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java:24: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/michaljarnot/IdeaProjects/react-native-redux-wix-navigation/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java:29: error: method does not override or implement a method from a supertype
        @Override
        ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors

Steps to Reproduce / Code Snippets / Screenshots

This is minimal example. Fresh react-native init project.

https://github.com/developer239/react-native-redux-wix-navigation/pull/3


Environment

  • React Native Navigation version: 2.0.2553
  • React Native version: 0.57.0
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Debug
questiostack overflow

Most helpful comment

i have the same problem

All 7 comments

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

i have the same problem

Hey guys, I think this section from the installation guide is related

afaik the v2 of react-native-navigation does not fully support react-native v57 yet.
So shift to v1 or lower your react native version to v56

same issue, does not work on android for RN 0.57

Same issue:-

I am trying to set up a new project from scratch.

    "react-native": "^0.57.3",
    "react-native-navigation": "^2.0.2608"

Tried/Integrated the following:-

  1. missingDimensionStrategy "RNN.reactNativeVersion", "reactNative56"

      2.
subprojects { subproject ->
  afterEvaluate {
     if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
        android {
          variantFilter { variant ->
             def names = variant.flavors*.name
                if (names.contains("reactNative51") || names.contains("reactNative55")) {
                  setIgnore(true)
                  }}}}}}
    3.
configurations.all {
  resolutionStrategy {
    eachDependency { DependencyResolveDetails details ->
       if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
         details.useVersion "0.57.3" // Your real React Native version here
       }}}}
  1. chmod 755 android/gradlew
  2. react-native run-android --variant debug

Everything boils down to these 2 errors on Android:-

  1. npm run android -
    Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED
    /Users/"system-name"/"project-name"/node_modules/react-native-navigation/lib/android/app/src/reactNative56/java/com/reactnativenavigation/react/SyncUiImplementation.java:10: error: cannot find symbol
    import com.facebook.react.uimanager.UIImplementationProvider;

  2. react-native run-android -
    Task :react-native-navigation:compileReactNative56DebugJavaWithJavac FAILED
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment

If I directly run the emulator from Android studio, everything works well.

Downgrading to react-native 0.56.0 throws this error on iOS:-

Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(/Users/"system-name"/"project-name"/index.js: .overrides is not allowed in preset options (null))

I would prefer a solution that won't require downgrading from react-native 0.57.3.

Any ideas?

Works on 0.56

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yayanartha picture yayanartha  路  3Comments

switchtrue picture switchtrue  路  3Comments

henrikra picture henrikra  路  3Comments

kiroukou picture kiroukou  路  3Comments

nbolender picture nbolender  路  3Comments