react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

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

Open developer239 opened this issue 8 years ago • 7 comments

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

developer239 avatar Sep 17 '18 00:09 developer239

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.

support avatar Sep 17 '18 06:09 support

i have the same problem

khaledafify avatar Sep 17 '18 19:09 khaledafify

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

guyca avatar Sep 18 '18 08:09 guyca

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

kennethpdev avatar Sep 30 '18 14:09 kennethpdev

same issue, does not work on android for RN 0.57

creative-git avatar Oct 17 '18 17:10 creative-git

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"

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)
                  }}}}}}
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?

PurnimaNaik avatar Oct 23 '18 15:10 PurnimaNaik

Works on 0.56

zoecarver avatar Oct 30 '18 02:10 zoecarver