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

Build is failing in Android #137

Closed
vishalpawar048 opened this issue Oct 18, 2024 · 9 comments
Closed

Build is failing in Android #137

vishalpawar048 opened this issue Oct 18, 2024 · 9 comments

Comments

@vishalpawar048
Copy link

vishalpawar048 commented Oct 18, 2024

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
Copy link

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
Copy link
Collaborator

Do you still have issue with latest releases?

@Ruchita-Missio
Copy link

Ruchita-Missio commented Oct 26, 2024

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

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-crisp-chat-sdk:compileReleaseKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

@enchorb
Copy link

enchorb commented Oct 28, 2024

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
Copy link
Collaborator

Only with org.commonmark'?

@Ruchita-Missio
Copy link

Ruchita-Missio commented Oct 28, 2024

what is solution for expo ? @baptistejamin

not working with org.commonmark

@AmanSafeer
Copy link

AmanSafeer commented Oct 31, 2024

@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

@mfrfinbox
Copy link

Hi @baptistejamin , for me, the problem is with Crisp using CommonMark 0.13.0 and RevenueCat 0.21.0. I had to do all sorts of magic with AI to sort it out with Expo. Is it too difficult to update that dependency from your end? That would be amazing.

@baptistejamin
Copy link
Collaborator

A solution was found on this thread. The solution consists of excluding common mark : #143

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

No branches or pull requests

7 participants