Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :detox:compileMinReactNative46DebugJavaWithJavac FAILED #919

Closed
stevechun opened this issue Sep 3, 2018 · 4 comments
Closed

Task :detox:compileMinReactNative46DebugJavaWithJavac FAILED #919

stevechun opened this issue Sep 3, 2018 · 4 comments

Comments

@stevechun
Copy link

Description

The following error is displayed when ./gradlew assembleHostDebugAndroidTest is triggered.

Task :detox:compileMinReactNative46DebugJavaWithJavac FAILED
.../node_modules/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java:65: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: .../node_modules/detox/android/detox/src/main/java/com/wix/detox/espresso/MultiTap.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

Steps to Reproduce

I have the following dependencies set up:

  • compileSdkVersion = 27
  • buildToolsVersion = '27.0.3'
  • targetSdkVersion = 26
  • supportLibVersion = '27.1.1'

I have also followed the migration doc

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 9.0.1
  • React Native: 0.55.3
  • Node: 9.3.0
  • Device: Android Emulator
  • Xcode: 9.4.1
  • macOS: 10.13.6 High Sierra
@noomorph
Copy link
Collaborator

noomorph commented Sep 3, 2018

What JDK?

@JamesWatling
Copy link

I am having the exact same issue with very similar dependencies

compileSdkVersion = 27
buildToolsVersion = '27.0.3'
targetSdkVersion = 21

Detox, Node, Device, Xcode and macOS Versions
Detox: 9.0.1
React Native: 0.53.0
Node: 9.8.0
Device: Android Emulator Google Pixel XL API 27
macOS: 10.13.6 High Sierra

@stevechun
Copy link
Author

@noomorph

java version "1.8.0_172"

@JamesWatling
Copy link

Ends up it's not working with React 0.53 - 0.55 but will work with 0.56 due to the overriding of an interface method that is not in the interface in react-native until 0.56

If you take a look at https://github.com/facebook/react-native/blob/0.55-stable/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.java you can see that in tag 0.55 the method is missing, and is subsequently added in 0.56.

Removing the @OverRide annotation from the onBridgeDestroyed() allows me to move forward

File: detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java

Before:

    @Override
    public void onBridgeDestroyed() {
    }

After:

    public void onBridgeDestroyed() {
    }

@lock lock bot locked as resolved and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants