Detox: Android Build Has Annotation Dependency Error

Created on 16 Jul 2019  路  7Comments  路  Source: wix/Detox

Describe the bug
With RN 0.60.3 the Android setup for Detox from the docs is causing an issue in the build (while running detox build -c android). Happened on a new React project.

To Reproduce

  • [x] I have tested this issue on the latest Detox release and it still reproduces

Environment (please complete the following information):

  • Detox: 13.1.1
  • React Native: 0.60.3

androidError.txt

triagbug android

Most helpful comment

As a temporary workaround add the following to your android/app/build.gradle

configurations.all {
    resolutionStrategy {
        // TODO: Line below required for Detox since version 12.5
        //   It should removed as soon as the project compiles without it
        force 'androidx.annotation:annotation:1.0.0'
    }
}

The issue is that Detox uses version 1.1.0 for android.annotation, while react native itself (or any of your dependencies) uses version 1.0.

All 7 comments

As a temporary workaround add the following to your android/app/build.gradle

configurations.all {
    resolutionStrategy {
        // TODO: Line below required for Detox since version 12.5
        //   It should removed as soon as the project compiles without it
        force 'androidx.annotation:annotation:1.0.0'
    }
}

The issue is that Detox uses version 1.1.0 for android.annotation, while react native itself (or any of your dependencies) uses version 1.0.

Same issue. Workaround fixed the problem for me. Thanks, @elyalvarado

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 Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

The issue still exists, and shouldn't be closed unless addressed, even if its just a documentation note to warn users having this error

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 Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

The issue still exists, and shouldn't be closed unless addressed, even if its just a documentation note to warn users having this error

Closing in favor of #1689. Please refer to the versions support table for latest info on this.

Was this page helpful?
0 / 5 - 0 ratings