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-firebase_app:packageDebugResources FAILE #8114

Closed
nusjeff opened this issue Nov 5, 2024 · 4 comments
Closed

[🐛] Task :react-native-firebase_app:packageDebugResources FAILE #8114

nusjeff opened this issue Nov 5, 2024 · 4 comments
Labels

Comments

@nusjeff
Copy link

nusjeff commented Nov 5, 2024

> Task :react-native-firebase_app:packageDebugResources FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
109 actionable tasks: 5 executed, 104 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':react-native-firebase_app:packageDebugResources' (type 'MergeResources').
  - Gradle detected a problem with the following location: '../node_modules/@react-native-firebase/app/android/build/generated/res/resValues/debug'.
    
    Reason: Task ':react-native-firebase_app:packageDebugResources' uses this output of task ':@react-native-firebase_app: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-firebase_app:generateDebugResValues' as an input of ':react-native-firebase_app:packageDebugResources'.
      2. Declare an explicit dependency on ':@react-native-firebase_app:generateDebugResValues' from ':react-native-firebase_app:packageDebugResources' using Task#dependsOn.
      3. Declare an explicit dependency on ':@react-native-firebase_app:generateDebugResValues' from ':react-native-firebase_app:packageDebugResources' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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.

BUILD FAILED in 5s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem was found with the configuration of task ':react-native-firebase_app:packageDebugResources' (type 'MergeResources'). - Gradle detected a problem with the following location: '/Users/kimhung/Desktop/SourceCty/Crew/node_modules/@react-native-firebase/app/android/build/generated/res/resValues/debug'. Reason: Task ':react-native-firebase_app:packageDebugResources' uses this output of task ':@react-native-firebase_app: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-firebase_app:generateDebugResValues' as an input of ':react-native-firebase_app:packageDebugResources'. 2. Declare an explicit dependency on ':@react-native-firebase_app:generateDebugResValues' from ':react-native-firebase_app:packageDebugResources' using Task#dependsOn. 3. Declare an explicit dependency on ':@react-native-firebase_app:generateDebugResValues' from ':react-native-firebase_app:packageDebugResources' using Task#mustRunAfter. For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation. * 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. BUILD FAILED in 5s.
info Run CLI with --verbose flag for more details.

Describe your issue here

---

## Project Files
    "@react-native-firebase/analytics": "20.0.0",
    "@react-native-firebase/app": "20.0.0",
    "@react-native-firebase/messaging": "20.0.0",
    "react": "18.2.0",
    "react-native": "^0.75.4",
    
## gradle-wrapper
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

## android/build.gradle
buildscript {
    ext {
        googlePlayServicesVersion = "+"
        androidMapsUtilsVersion = "0.5+"
        firebaseMessagingVersion = "21.1.0"
        googlePlayServicesLocationVersion = "21.0.1"  
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        appCompatVersion = "1.1.0"
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.24"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath('com.google.gms:google-services:4.4.2')
    }
}


@nusjeff
Copy link
Author

nusjeff commented Nov 5, 2024

package.json
{
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@gorhom/bottom-sheet": "^5.0.5",
    "@kesha-antonov/react-native-action-cable": "^1.1.5",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/datetimepicker": "^8.2.0",
    "@react-native-community/geolocation": "^3.4.0",
    "@react-native-community/netinfo": "^11.4.1",
    "@react-native-community/push-notification-ios": "^1.11.0",
    "@react-native-firebase/analytics": "20.0.0",
    "@react-native-firebase/app": "20.0.0",
    "@react-native-firebase/messaging": "20.0.0",
    "@react-native-masked-view/masked-view": "^0.3.1",
    "@react-native-voice/voice": "^3.2.4",
    "@react-navigation/bottom-tabs": "^6.6.1",
    "@react-navigation/drawer": "^6.7.2",
    "@react-navigation/native": "^6.1.18",
    "@react-navigation/native-stack": "^6.11.0",
    "@sentry/react-native": "^6.1.0",
    "axios": "^1.7.7",
    "deprecated-react-native-prop-types": "^5.0.0",
    "formik": "^2.4.6",
    "google-libphonenumber": "^3.2.38",
    "i18n-js": "^3.7.0",
    "lodash": "^4.17.21",
    "moment": "^2.30.1",
    "patch-package": "^8.0.0",
    "postinstall-postinstall": "^2.1.0",
    "qs": "^6.13.0",
    "react": "18.2.0",
    "react-native": "^0.75.4",
    "react-native-actioncable": "^0.0.3",
    "react-native-android-location-enabler": "^2.0.1",
    "react-native-background-fetch": "^4.2.5",
    "react-native-background-geolocation": "^4.17.4",
    "react-native-background-timer": "^2.4.1",
    "react-native-calendars": "^1.1307.0",
    "react-native-cli": "^2.0.1",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-device-info": "^14.0.0",
    "react-native-dimension": "^1.0.6",
    "react-native-dropdown-picker": "^5.4.6",
    "react-native-element-dropdown": "^2.12.2",
    "react-native-elements": "^3.4.3",
    "react-native-flash-message": "^0.4.2",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "^2.20.2",
    "react-native-get-random-values": "^1.11.0",
    "react-native-gifted-chat": "^2.6.4",
    "react-native-gradle-plugin": "^0.71.19",
    "react-native-image-picker": "^7.1.2",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-keep-awake": "^4.0.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-localize": "^3.2.1",
    "react-native-maps": "^1.18.2",
    "react-native-maps-directions": "^1.9.0",
    "react-native-modal": "^13.0.1",
    "react-native-modal-datetime-picker": "^18.0.0",
    "react-native-modal-selector": "^2.1.2",
    "react-native-permissions": "^5.1.0",
    "react-native-popup-menu": "^0.16.1",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "^3.16.1",
    "react-native-redash": "^18.1.3",
    "react-native-rename": "^3.2.14",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-restart": "^0.0.27",
    "react-native-safe-area-context": "^4.13.1",
    "react-native-screens": "^3.35.0",
    "react-native-sound": "^0.11.2",
    "react-native-splash-screen": "^3.3.0",
    "react-native-svg": "^15.8.0",
    "react-native-swipeout": "^2.3.6",
    "react-native-swiper-flatlist": "^3.2.5",
    "react-native-tts": "^4.1.1",
    "react-native-vector-icons": "^10.2.0",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-logger": "^3.0.6",
    "redux-observable": "^1.2.0",
    "redux-persist": "^6.0.0",
    "redux-saga": "^1.1.3",
    "rn-round-checkbox": "^1.0.0",
    "socket.io-client": "^2.3.0",
    "yup": "^1.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.88",
    "@react-native/eslint-config": "0.74.88",
    "@react-native/metro-config": "0.74.88",
    "@react-native/typescript-config": "0.74.88",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "babel-plugin-root-import": "^6.6.0",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-native-svg-transformer": "^1.5.0",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

@mikehardy
Copy link
Collaborator


    "@react-native-firebase/analytics": "20.0.0",
    "@react-native-firebase/app": "20.0.0",
    "@react-native-firebase/messaging": "20.0.0",

Please only report issues on current versions

Also note that this is not reproduced in either our e2e environment or my fully automated script build script that I would reproduce this with https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh, so we will need a reproduction - closing until reproduction provided as my script is fully automated, can be run by anyone, and shows everything working

https://stackoverflow.com/help/minimal-reproducible-example

Note that if you are having problems with debug res values, you might temporarily return android/app/src/main/res files to their default states from react-native template, you may have something wrong in there causing you problems

https://github.com/facebook/react-native/tree/main/packages/helloworld/android/app/src/main/res/values

@Raghul7S
Copy link

@mikehardy I am facing the same issue. What are the things that you know from my project for the solution ?

@mikehardy
Copy link
Collaborator

@Raghul7S there is no reproduction for this error posted, so I can't say anything definitive. My comments about reproduction above are still the only things I know: I have a reproducer that builds from scratch and works. No one has posted a reproducer that does not work, so we continue with the assumption there is something wrong in people's local projects until there is a reproducer showing otherwise

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

No branches or pull requests

3 participants