-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
I can't run npx react-native run-android --variant=release
after installing react-native-firebase
packages
#6079
Comments
Hi there! I run a release build of react-native-firebase as part of testing really frequently, so you'll have to post a minimal reproducible repro of the failure or I have to assume this is a non-actionable project-specific problem that won't result in a change to the module -- test: https://github.com/mikehardy/rnfbdemo/blob/5832610cea363bba18be94d08f49c0e846bdfb0d/make-demo.sh#L242 If you can produce a minimal reproducible example with an android release build failure of course we can reopen, otherwise hopefully the make-demo script helps a bit in generating a project that works, so you can see maybe where your project is having problems |
Hey @mikehardy, sorry I just forgot to include the error this is the whole out put from while I'm running the command, ➜ frontend git:(feature/chat-system) ✗ npm run android -- --variant=release
> univarsity@0.0.1 android
> react-native run-android "--variant=release"
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1478 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Configure project :notifee_react-native
:notifee_react-native package.json found at /home/emad/projects/univarsity/frontend/node_modules/@notifee/react-native/package.json
:notifee_react-native:version set from package.json: 4.1.0 (4,1,0 - 4001000)
:notifee_react-native:android.compileSdk using custom value: 30
:notifee_react-native:android.targetSdk using custom value: 30
:notifee_react-native:android.minSdk using custom value: 21
:notifee_react-native:reactNativeAndroidDir /home/emad/projects/univarsity/frontend/node_modules/react-native/android
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:firebase.bom using default value: 29.0.4
:react-native-firebase_app:play.play-services-auth using default value: 20.0.1
:react-native-firebase_app package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:version set from package.json: 14.3.1 (14,3,1 - 14003001)
:react-native-firebase_app:android.compileSdk using custom value: 30
:react-native-firebase_app:android.targetSdk using custom value: 30
:react-native-firebase_app:android.minSdk using custom value: 21
:react-native-firebase_app:reactNativeAndroidDir /home/emad/projects/univarsity/frontend/node_modules/react-native/android
> Configure project :react-native-firebase_firestore
:react-native-firebase_firestore package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/firestore/package.json
:react-native-firebase_app package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_firestore:firebase.bom using default value: 29.0.4
:react-native-firebase_firestore package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/firestore/package.json
:react-native-firebase_firestore:version set from package.json: 14.3.1 (14,3,1 - 14003001)
:react-native-firebase_firestore:android.compileSdk using custom value: 30
:react-native-firebase_firestore:android.targetSdk using custom value: 30
:react-native-firebase_firestore:android.minSdk using custom value: 21
:react-native-firebase_firestore:reactNativeAndroidDir /home/emad/projects/univarsity/frontend/node_modules/react-native/android
> Configure project :react-native-firebase_in-app-messaging
:react-native-firebase_in-app-messaging package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/in-app-messaging/package.json
:react-native-firebase_app package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_in-app-messaging:firebase.bom using default value: 29.0.4
:react-native-firebase_in-app-messaging package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/in-app-messaging/package.json
:react-native-firebase_in-app-messaging:version set from package.json: 14.3.1 (14,3,1 - 14003001)
:react-native-firebase_in-app-messaging:android.compileSdk using custom value: 30
:react-native-firebase_in-app-messaging:android.targetSdk using custom value: 30
:react-native-firebase_in-app-messaging:android.minSdk using custom value: 21
:react-native-firebase_in-app-messaging:reactNativeAndroidDir /home/emad/projects/univarsity/frontend/node_modules/react-native/android
> Configure project :react-native-firebase_messaging
:react-native-firebase_messaging package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/messaging/package.json
:react-native-firebase_app package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_messaging:firebase.bom using default value: 29.0.4
:react-native-firebase_messaging package.json found at /home/emad/projects/univarsity/frontend/node_modules/@react-native-firebase/messaging/package.json
:react-native-firebase_messaging:version set from package.json: 14.3.1 (14,3,1 - 14003001)
:react-native-firebase_messaging:android.compileSdk using custom value: 30
:react-native-firebase_messaging:android.targetSdk using custom value: 30
:react-native-firebase_messaging:android.minSdk using custom value: 21
:react-native-firebase_messaging:reactNativeAndroidDir /home/emad/projects/univarsity/frontend/node_modules/react-native/android
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Welcome to Metro!
Fast - Scalable - Integrated
info Writing bundle output to:, /home/emad/projects/univarsity/frontend/android/app/build/generated/assets/react/release/index.android.bundle
info Writing sourcemap output to:, /home/emad/projects/univarsity/frontend/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 36 asset files
info Done copying assets
> Task :app:compileReleaseJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
288 actionable tasks: 3 executed, 285 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find lifecycle-runtime-2.2.0.jar (androidx.lifecycle:lifecycle-runtime:2.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.jar
* 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 1m 41s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installRelease -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find lifecycle-runtime-2.2.0.jar (androidx.lifecycle:lifecycle-runtime:2.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.jar
* 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 1m 41s
at makeError (/home/emad/projects/univarsity/frontend/node_modules/execa/index.js:174:9)
at /home/emad/projects/univarsity/frontend/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/home/emad/projects/univarsity/frontend/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/home/emad/projects/univarsity/frontend/node_modules/@react-native-community/cli/build/index.js:186:9)
info Run CLI with --verbose flag for more details. |
And actually, I'm using |
With apologies,
This has nothing to do with this module, it looks like you have some sort of local network issue. My answer stands with regard to frequent testing on this type of build, and that you have a local problem. There is not anything we can do here to help.
You should aim to be on the current stable version as a general goal, all the time. react-native 0.64 does not even compile with Xcode 13, I'm not sure why anyone would use a version that old. I would not stay on that version, personally. |
@mikehardy What kind of local network issue it could be? |
@emadbaqeri this does not have to do with this module so I won't have the time to reply further, but I can say that you should find results on that type of error via standard web searches and/or stackoverflow - I myself have seen questions and answers for similar items and the guidance there will be helpful. |
I have installed and tested the react-native-firebase tools in my react-native project everything was working fine until I decide to run the
commend,
for testing my app before releasing it to the store.
Describe your issue here
While I'm trying to install the debug version of the application on the phone and test the app everything works fine but while I'm trying to run the app in production mode I mean release variant mode to test, it fails while I'm running the
npx react-native run-android --variant=release
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:TypeScript
?The text was updated successfully, but these errors were encountered: