walterholohan / react-native-crisp-chat-sdk

React-Native bridge for Crisp Chat iOS and Android SDK's
MIT License
70 stars 26 forks source link

Build is failing in Android #137

Open vishalpawar048 opened 2 weeks ago

vishalpawar048 commented 2 weeks ago

I installed crisp in the react native project. It works fine with IOS but it is failing with the following error in Android. React Native: 0.74

buildToolsVersion = '34.0.0' minSdkVersion = '24' compileSdkVersion = '34' targetSdkVersion = '34' kotlinVersion = '1.9.23' ndkVersion = "26.1.10909125"

I also tried kotlinVersion: 1.7.20 but no luck.

Error:

Configure project :react-native-reanimated
Android gradle plugin: 8.2.1
Gradle: 8.6

Task :app:checkDebugDuplicateClasses FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class org.commonmark.Extension found in modules commonmark-0.13.0.jar -> jetified-commonmark-0.13.0 (com.atlassian.commonmark:commonmark:0.13.0) and commonmark-0.21.0.jar -> jetified-commonmark-0.21.0 (org.commonmark:commonmark:0.21.0)
     Duplicate class org.commonmark.internal.BlockContent found in modules commonmark-0.13.0.jar -> jetified-commonmark-0.13.0 (com.atlassian.commonmark:commonmark:0.13.0) and commonmark-0.21.0.jar -> jetified-commonmark-0.21.0 (org.commonmark:commonmark:0.21.0)
Cypherball commented 1 week ago

This error occurred for us after integrating RevenueCat SDK along with Crisp Chat in our app. Both use commonmark module but from different groups. Try adding this to your app's build.gradle.

android {
 ...other options

 configurations {
      all {
          exclude group: 'org.commonmark', module: 'commonmark' // IMPORTANT: This removes all transitive dependencies of 'org.commonmark' group's `commonmark` module.
      }
    }
}

Crisp uses commonmark from com.atlassian.commonmark, which we are keeping and will use for other libraries.

baptistejamin commented 1 week ago

Do you still have issue with latest releases?

Ruchita-Missio commented 6 days ago

I am facing same error in expo build. any solution?

FAILURE: Build failed with an exception.

enchorb commented 4 days ago

Getting this as well on the 0.15.1 & 0.14.5 -- working on 0.14.4 and below

Task :react-native-crisp-chat-sdk:compileDebugKotlin FAILED

baptistejamin commented 4 days ago

Only with org.commonmark'?

Ruchita-Missio commented 4 days ago

what is solution for expo ? @baptistejamin

not working with org.commonmark

AmanSafeer commented 1 day ago

@baptistejamin

Getting this error in android on version 0.15.1 while running example app of this sdk: Task :reactnativecrispchatsdk:compileDebugKotlin FAILED

However build was working on 0.14.4.

Screenshot 2024-10-31 at 12 03 56 PM