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

Error after add @datadog/mobile-react-native #713

Open
AlexLFundbox opened this issue Aug 1, 2024 · 3 comments
Open

Error after add @datadog/mobile-react-native #713

AlexLFundbox opened this issue Aug 1, 2024 · 3 comments
Labels

Comments

@AlexLFundbox
Copy link

Describe the issue

I'm trying to add "@datadog/mobile-react-native": "^2.4.3" and "@datadog/mobile-react-navigation": "^2.4.3"
but getting error on android build
`* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class androidx.work.OneTimeWorkRequestKt found in modules work-runtime-2.8.1.aar -> work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.1.aar -> work-runtime-ktx-2.7.1-runtime (androidx.work:work-runtime-ktx:2.7.1)
Duplicate class androidx.work.PeriodicWorkRequestKt found in modules work-runtime-2.8.1.aar -> work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.1.aar -> work-runtime-ktx-2.7.1-runtime (androidx.work:work-runtime-ktx:2.7.1)`

 Attaching my dependency tree

output.txt

According to dependency tree, I have 2 libraries (react-native-plaid-link-sdk and react-native-idfa) that use different version of work-runtime
I'm also using the last versions of those libraries
androidx.work:work-runtime:2.7.1 -> 2.8.1

Is there any idea how can i resolve this issue?

Reproduction steps

I believe that reproduction steps are: to install react-native-plaid-link-sdk and react-native-idfa
And then install @datadog/mobile-react-native and @datadog/mobile-react-navigation and try to build android

SDK logs

No response

Device Information

No response

SDK version

2.4.3

Integration Methods

Yarn

React Native Version

0.74.3

Package.json Contents

No response

iOS Setup

No response

Android Setup

No response

Other relevant information

No response

@AlexLFundbox
Copy link
Author

AlexLFundbox commented Aug 6, 2024

I've added this in app.build.gradle inside dependencies

configurations.all {
    resolutionStrategy {
        force 'androidx.work:work-runtime:2.8.1'
        force 'androidx.work:work-runtime-ktx:2.8.1'
    }
}

but now I'm seeing this issue

> Task :datadog_mobile-react-native:runKtlintCheckOverMainSourceSet FAILED

> Task :app:minifyReleaseWithR8
WARNING: R8: Class com.facebook.imagepipeline.image.CloseableAnimatedImage extends com.facebook.imagepipeline.image.CloseableImage which is an interface

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':datadog_mobile-react-native:runKtlintCheckOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   > KtLint failed to parse file: /Users/alex.lvovsky/fundbox/mobileNative/node_modules/@datadog/mobile-react-native/android/src/oldarch/kotlin/com/datadog/reactnative/DdLogs.kt

@marco-saia-datadog
Copy link
Member

Hi @AlexLFundbox, thank you for reaching out! I'll investigate this soon and get back to you. Do you know which dependency is causing the conflict? Is it react-native-plaid-link-sdk or react-native-idfa?

@AlexLFundbox
Copy link
Author

@marco-saia-datadog , thanks for your response
Actually it's coming from both of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants