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_checkbox:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@react-native-community_checkbox:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. #204

Open
Jwiggiff opened this issue Jul 31, 2023 · 2 comments

Comments

@Jwiggiff
Copy link

Hello,

I'm getting the following error when trying to build the release version of my app:

> Task :react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars' (type 'LibraryJniLibsTask').
  - Gradle detected a problem with the following location: 'D:\Users\fried\Documents\Ollon\Ballmatics\ballmatics.mobile\node_modules\@react-native-community\checkbox\android\build\intermediates\stripped_native_libs\release\out'.    

    Reason: Task ':react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@react-native-community_checkbox:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':@react-native-community_checkbox:stripReleaseDebugSymbols' as an input of ':react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars'.
      2. Declare an explicit dependency on ':@react-native-community_checkbox:stripReleaseDebugSymbols' from ':react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars' using Task#dependsOn.
      3. Declare an explicit dependency on ':@react-native-community_checkbox:stripReleaseDebugSymbols' from ':react-native-community_checkbox:copyReleaseJniLibsProjectAndLocalJars' using Task#mustRunAfter.

    Please refer to https://docs.gradle.org/8.0.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

I believe this issue arose after upgrading to RN 0.72. I am using Gradle: 8.0.1 and Android Gradle Plugin: 7.4.2

@arochedy
Copy link

arochedy commented Dec 8, 2023

Same problem with async-storage

A problem was found with the configuration of task ':react-native-async-storage_async-storage:copyReleaseJniLibsProjectAndLocalJars' (type 'LibraryJniLibsTask').

  • Gradle detected a problem with the following location: 'node_modules/@react-native-async-storage/async-storage/android/build/intermediates/stripped_native_libs/release/out'.

    Reason: Task ':react-native-async-storage_async-storage:copyReleaseJniLibsProjectAndLocalJars' uses this output of task ':@react-native-async-storage:stripReleaseDebugSymbols' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:

    1. Declare task ':@react-native-async-storage:stripReleaseDebugSymbols' as an input of ':react-native-async-storage_async-storage:copyReleaseJniLibsProjectAndLocalJars'.
    2. Declare an explicit dependency on ':@react-native-async-storage:stripReleaseDebugSymbols' from ':react-native-async-storage_async-storage:copyReleaseJniLibsProjectAndLocalJars' using Task#dependsOn.
    3. Declare an explicit dependency on ':@react-native-async-storage:stripReleaseDebugSymbols' from ':react-native-async-storage_async-storage:copyReleaseJniLibsProjectAndLocalJars' using Task#mustRunAfter.

    Did you find something ?

@arochedy
Copy link

arochedy commented Dec 8, 2023

Found it :

Need to remove theses lines in settings.gradle

include ':@react-native-async-storage'
project(':@react-native-async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-async-storage/async-storage/android')

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

2 participants