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

Task :react-native-community_clipboard:compileDebugJavaWithJavac FAILED #184

Closed
Anubhavjain786 opened this issue Jun 19, 2023 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@Anubhavjain786
Copy link

Anubhavjain786 commented Jun 19, 2023

No description provided.

@Anubhavjain786 Anubhavjain786 added the bug Something isn't working label Jun 19, 2023
@xaiamov
Copy link

xaiamov commented Aug 1, 2023

Writing here to help somebody. I had the issue compiling my project for android.

> Task :app:mergeLibDexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeLibDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform classes.jar (project :react-native-community_clipboard) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, com.android.build.api.attributes.AgpVersionAttr=7.4.2, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.gradle.internal.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/.../node_modules/@react-native-community/clipboard/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar.
         > Unable to read jar file /Users/.../node_modules/@react-native-community/clipboard/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar

The solution was to increase the minSdkVersion from 21 to 24 (for at least) in android/build.gradle.

@gtokman
Copy link

gtokman commented Oct 22, 2023

@xaiamov you're the goat! thank you 🙂

@manishprimathon
Copy link

@xaiamov I have already minSdkVersion is 24, but I am getting below issue

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-community_clipboard:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

let me know, if any one can help me to solve this

@Jamal-ReachFirst
Copy link

@xaiamov I have already minSdkVersion is 24, but I am getting below issue

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-community_clipboard:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

let me know, if any one can help me to solve this

+1

@MuriloBarranco
Copy link

+1

@itsShivamBhalla
Copy link

same++

@Swapnil7387
Copy link

There is a patch for this bug and it is working fine:
Go to file: /@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java
There search for the method: removeListeners(int count), it may be at line no: 240
Replace the int parameter with double method with removeListeners(double count)
All credit goes to: #238 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants