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

2 files found with path 'META-INF/com.android.tools/proguard/coroutines.pro' #77

Open
1 task done
jonathanm-tkf opened this issue May 22, 2024 · 3 comments
Open
1 task done

Comments

@jonathanm-tkf
Copy link

Current behavior

Hi guys I have a litter problem with the library, when I try to compile I have this error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-keys:mergeDebugAndroidTestJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 2 files found with path 'META-INF/com.android.tools/proguard/coroutines.pro' from inputs:
      - /Users/j{user-name}/.gradle/caches/transforms-3/b207d690a4debb38ef8061a3ea8c4b4a/transformed/jetified-kotlinx-coroutines-core-jvm-1.6.1.jar
      - /Users/{user-name}/.gradle/caches/transforms-3/017a23198fed8b7afa4e7f3e58e24b6f/transformed/jetified-kotlinx-coroutines-android-1.6.1.jar
     Adding a packagingOptions block may help, please refer to
     https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/ResourcesPackagingOptions
     for more information

Could you help me please, thanks

Expected behavior

Platform

  • Android
  • [] iOS

React Native Version

0.73.6

Copy link

👋 @jonathanm-tkf
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@deepakv-z14
Copy link

facing similar issue.
@numandev1 any idea how to fix this?

@renatop7
Copy link

@jonathanm-tkf @deepakv-z14 This is how I fixed:

Line 154 of node_modules/react-native-keys/android/build.gradle:

  packagingOptions {
    excludes = [
      "**/libc++_shared.so",
      "**/libfbjni.so",
      "**/libreactnativejni.so",
      "**/libjsi.so",
      "**/libreact_nativemodule_core.so",
      "**/libturbomodulejsijni.so",
      "**/MANIFEST.MF",
      "META-INF/com.android.tools/proguard/coroutines.pro", //<--- Add this 
      "META-INF/proguard/coroutines.pro", //<--- Add this 
      ""
    ]
    doNotStrip '**/*.so'
  }

Run gradle clean and rebuild the project.

Maybe @numandev1 has a better way to fix this but in the meantime I'm using this fix with a patch-package patch

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

3 participants