-
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
[🐛] A problem occurred gradlew clean RN project. Problem occurred evaluating project ':@react-native-firebase_analytics'. > It is too late to set namespace #8454
Comments
Instead of using 'sed' to set the namespace, try set it in your gradle files instead. |
Thanks Michael for your response, but I did try. Not sure if all these gradle files has any overlap and causing issues? |
You've logged a build issue that seems to focus on incompatible versions You have provided no version information Those two things don't seem to go together... |
Thank you Mike for your response. This is a 5 year old mobile app that needs to be migrated from AppCenter (decommed) to GitLab. Is there a version standard btw package.json with all its dependencies ver and script calls, android/build.gradle, android/app/build.gradle seems to inherits the parent ver, gradle.properties seems to be the overlap btw build.gradle and gradle.properties, and the gradle-wrapper.properties seems to be the dist ver ONLY. Plus due to some Gitlab issues with disk space, cache, and token to import libraries from github, I decided to go with the Docker image thats prepackaged. I did run an echo to check all the ver. All 3 AI helps, but it somewhat seems to mislead you into an infinite loop... Im not a DevOps guy, more of a full stack Java guy that is working on this since there is no DevOps in this company. |
Also does following npx react-native info and gradlew dependencies helps, or it will take me down to a deeper rabbit hole? |
https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh There are an infinite number of ways to do things wrong so they don't build, and it's an impossible task to fix them all. So that script above is a demonstrator of how exactly to do it correctly. You can read it, read the comments, run it, and it'll generate a project that builds without taking infinite maintainer time troubleshooting project-specific errors |
Thank you Mike, will definitely do, cheers! |
Issue
Found something similar in #7801
We are running it on Gitlab CI React Native project for both Android and iOS. It has a parent gitlab-ci and the respective child ones.
Env:
image: reactnativecommunity/react-native-android:latest
Kotlin: 1.8.0
Gradle: gradle-8.2-all.zip
Java: 17
Follow the same setup as Robert Savage from the prior closed issue
android/buil.gradle setting the plugin dependency to not be dynamic so classpath "com.facebook.react:react-native-gradle-plugin:8.2"
Then lastly in my android/app/build.gradle I set this as my dependencies:
dependencies {
implementation 'com.facebook.react:react-native:+'
}
in the gitlab-ci added this line below to chg the namespace.
Describe your issue here
Still a showstopper at this specific location
Build was configured to prefer settings repositories over project repositories but repository 'maven5' was added by plugin 'com.facebook.react'
FAILURE: Build failed with an exception.
Build file '/builds/... /node_modules/@react-native-firebase/analytics/android/build.gradle' line: 122
A problem occurred evaluating project ':@react-native-firebase_analytics'.
Project Files
Explained above
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:# N/A
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?not sure about above but have it below
gradle.properties
android.enableJetifier=true
android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 5.4.3
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
package.json
"@react-native-firebase/analytics": "^21.13.0",
"@react-native-firebase/app": "^21.13.0",
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: