Search code examples
react-nativee2e-testingdetox

Detox Android "detox:compileMinReactNative44DebugJavaWithJavac" Error


React Native: 0.53.3 Detox: 9.0.1

I entered a script, and I get an error.

./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug

Error Log

> Task :detox:compileMinReactNative44DebugJavaWithJavac FAILED
/Users/{userName}/{ProjectName}/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: /Users/{userName}/{ProjectName}/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.

I have faithfully followed the contents below. https://wix.github.io/detox/docs/7.2.0/Introduction.Android.html

I look forward to your kind reply. :)


Solution

  • It seems latest Detox release v9.0.1 is not friendly with RN version < 0.55. https://github.com/wix/Detox/issues/919.

    This seems fixed now and merged to master. https://github.com/wix/detox/pull/922 I guess you need to either wait for next release (v9.0.2) or clone --> build from repo.

    Keep an eye on releases page --> https://github.com/wix/detox/releases

    Hope this helps.