When I try to build for production, this error comes up. I'm using React Native Firebase. This error happens on android.
Here is the error
* What went wrong:
Execution failed for task ':react-native-firebase_app:generateReleaseRFile'.
> Could not resolve all files for configuration ':react-native-firebase_app:releaseCompileClasspath'.
> Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar
Here are my packages
[tag: "@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-firebase/analytics": "^16.4.3",
"@react-native-firebase/app": "^16.4.3",
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/native": "^6.0.13",
"@react-navigation/native-stack": "^6.9.1",
"@rneui/base": "^4.0.0-rc.7",
"@rneui/themed": "^4.0.0-rc.7",
"meilisearch": "^0.29.1",
"native-base": "^3.4.21",
"picomatch": "^2.3.1",
"react": "18.1.0",
"react-native": "0.70.3",
"react-native-firebase": "^5.6.0",
"react-native-google-mobile-ads": "^8.2.1",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-svg": "^13.5.0",
"react-native-vector-icons": "^9.2.0"]
If you can help, thanks!
I have tried everything I could find online =(
I have also tried npx jetify
CodePudding user response:
This is a bug with react native, a fix has been released. Check https://github.com/facebook/react-native/issues/35210
CodePudding user response:
as the first answer said it's issue in maven central and react-native resolved that here https://github.com/facebook/react-native/issues/35210.... in package.json file update react-native by replace this line
"react-native": "0.70.5"
then npm install