pendo-io / pendo-mobile-sdk

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value
https://www.pendo.io
Other
57 stars 2 forks source link

Android fails to compile #143

Closed kg-currenxie closed 1 month ago

kg-currenxie commented 1 month ago

Platform + Version Android + RN 0.70.13

        supportLibVersion = "33.0.0"
        buildToolsVersion = "33.0.0"
        minSdkVersion = 23
        compileSdkVersion = 33
        targetSdkVersion = 33
        kotlinVersion = '1.9.0'

and distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

SDK Version "rn-pendo-sdk": "3.2.0",

Framework React Native using React Navigation,

Describe the bug Seems this package requires kotlin 1.9. So we upgraded that from 1.6.x. It built successfully. Then after adding the "rn-pendo-sdk", and the maven url, the app doesn't compile anymore.

To Reproduce Steps to reproduce the behavior:

  1. Have an app that compiles ✅
  2. Add rn-pendo-sdk package ✅
  3. Compile app with Pendo ❌
  4. Remove the package, and recompile ✅

Expected behavior Compilation to work

Logs


* What went wrong:
Execution failed for task ':app:checkStagingDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.9.0-runtime (com.google.android.play:core:1.9.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
randmaayan commented 1 month ago

Hi - please add the following to your app/build.gradle -

configurations.all {
       exclude group: 'com.google.android.play', module: 'review'
    }

please update us. thank you!

df-currenxie commented 1 month ago

Hi - please add the following to your app/build.gradle -

configurations.all {
       exclude group: 'com.google.android.play', module: 'review'
    }

please update us. thank you!

That worked, thanks @randmaayan. Maybe it could be included in the docs as well :)