Closed michaelmurr closed 6 months ago
hi The same issue coming on my project also.
I fixed this issue by creating a new react native project with version 0.73. I then copied all the files (including the .git folder to preserve my commit history) over and installed the npm packages one by one while configuring each one. After about 2 days i got it working in the new version without any issues. I strongly recommend this over the tedious upgrade process of an existing project.
hi @michaelmurr I have a big project and copying it will be a difficult task. Do you know any other option?
hi @michaelmurr I have a big project and copying it will be a difficult task. Do you know any other option?
I don't unfortunately know another option. My own project was quite big, consisting of around 7.5k lines of code with countless npm packages.
What I do know is that i spent about half a month reading through every single post and article i found on the internet about upgrading, as well as asking ChatGPT and Google Bard in the most different ways about this and none of them helped. while I often times managed to fix an error, this usually turned out to be only a small step forwards since the next error came right by, repeating the cycle again.
My app was already launched in the google play store beforehand and I have also done plenty of configuration work for things like google sign in and keystore files. In my case, migration issues that came along in regards to those cofigurations were quickly resolved by copying the corresponding configurationfiles over into the right directorys and by making sure the package name (com.example.app) from the new project lined up with the old one.
hi @michaelmurr
i have fixed the issue we just need to add namespace in android /app/build.gradle
file and remove from androidManifest.xml
file
Hi, I am encountering this same issue when upgrading from 0.72.9 to 0.73.2. Starting from scratch and copying files is not an option, as I have a huge project, with a lot of native modules and modifications in Android native files. Has anybody found a solution to this? Thanks!
Encountering same issue whilst upgrading from 0.72.4 to 0.73.2. No issues on iOS, it's always a pain in the... with gradle and android...
hi @michaelmurr i have fixed the issue we just need to add namespace in
android /app/build.gradle
file and remove fromandroidManifest.xml
file
Could you give more details on that. What do you mean exactly?
Hi, I am encountering this same issue when upgrading from 0.72.9 to 0.73.2. Starting from scratch and copying files is not an option, as I have a huge project, with a lot of native modules and modifications in Android native files. Has anybody found a solution to this? Thanks!
I assume your ios project is running without any issues. Here is how I solved my issue without integrating the sources fully in a new created project, which might help you and others that come across this issue: 1 ) Create a new react-native project (npx react-native@latest init AwesomProject) 2) Install react-native-rename (npm i react-native-rename)
It took me about half an hour to solve it on that way, would probably take longer if you have to copy the whole project including configurations in ios. I know, it might be a bit tricky, but that avoids to copy paste the whole project sources.
I had the same error and it was solved when I found out we missed to add the namespace "com.<your namespace>"
under android section in app/build.gradle after upgrade to 0.71.
It was not an issue before updating to 0.73 though.
remove node_modules and reinstall node_modules
rm -rf node_modules
npm install
Environment
Things I’ve done to figure out my issue
Upgrading version
Upgrade from react-native 0.68.2 to 0.73
Description
I used the react-native upgrade helper to do all the changes to the file, however, using kotlin Version 1.8.0 along with gradle 8.3 as specified in the upgrade helper gave me the following error when trying to build it in android studio:
This is my android/build.gradle
gradle-wrapper.properties
My approach to fixing this issue was to look up the compatible kotlin and gradle versions and adjust the versions accordingly. Using this link https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin I changed the kotlinVersion in build.gradle to 1.9.20 and the distributionUrl from gradle-wrapper.properties to
additionally, i ran
after that, when trying to build the app using
i get this error:
Line 28 has been marked in the build.gradle earlier
Reproducible demo
i unfortunately cannot provide a demo