Skip to content

Task 'packageDebugResources' uses this output of task 'generateDebugResValues' without declaring an explicit or implicit dependency. #1210

@RiteshSaste

Description

@RiteshSaste

What happened?

I created new react-native project with version 0.78, and added the async-storage via, yarn add, it installed the latest 2.2.0
Auto linking did not work for me due to some libraries, so I have setup manual linking:
The issue I'm facing is the below error is persistent, I have tried adding both 'dependsOn' and 'mustRunAfter' in afterEvaluate block:
A problem was found with the configuration of task ':react-native-async-storage_async-storage:packageDebugResources' (type 'MergeResources').

  • Gradle detected a problem with the following location: '/Users/sandeep/Documents/MS_NewApp/mobileservice-1/node_modules/@react-native-async-storage/async-storage/android/build/generated/res/resValues/debug'.

    Reason: Task ':react-native-async-storage_async-storage:packageDebugResources' uses this output of task ':@react-native-async-storage_async-storage:generateDebugResValues' 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_async-storage:generateDebugResValues' as an input of ':react-native-async-storage_async-storage:packageDebugResources'.
    2. Declare an explicit dependency on ':@react-native-async-storage_async-storage:generateDebugResValues' from ':react-native-async-storage_async-storage:packageDebugResources' using Task#dependsOn.
    3. Declare an explicit dependency on ':@react-native-async-storage_async-storage:generateDebugResValues' from ':react-native-async-storage_async-storage:packageDebugResources' using Task#mustRunAfter.

PS: Please ask for any required files and I will paste in after masking important details.
Also, I have tried to downgrade to 1.24.0 and 1.23, but the issue persists.

Version

2.2.0

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

npx react-native info
warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "npx react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
  OS: macOS 15.5
  CPU: (8) arm64 Apple M1
  Memory: 144.45 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.8
    path: ~/.nvm/versions/node/v18.20.8/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v18.20.8/bin/npm
  Watchman:
    version: 2025.05.26.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "25"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
      - 35.0.1
    System Images:
      - android-29 | Google Play ARM 64 v8a
      - android-30 | Google Play ARM 64 v8a
      - android-32 | Google Play ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-VanillaIceCream | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.13103373
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 3.4.4
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: ~19.0.0
  react-native:
    installed: 0.78.3
    wanted: ~0.78.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

info React Native v0.80.1 is now available (your project is running on v0.78.3).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.80.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.78.3&to=0.80.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Steps to Reproduce

Setup new react native project with manual linking and try to run using yarn android.

  • React native ~0.78.0
  • setup and do manual linking steps in the settings.gradle and build.gradle files
  • Gradle versions: distributionUrl=https://services.gradle.org/distributions/gradle-8.10.2-all.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions