MainActivity.java and MainApplication.java errorsSee original GitHub issue
This issue is related to #66
I am creating a separate issue because I noticed some additional issues:
When I ran the command
react-native-rename "TravelApp" -b com.travelcompany.app
The following issues occurred:
- Deleted my
MainApplication.javafile instead of just changing the package name.
MainActivity.java, it didn’t change the return value of
getMainComponentName()causing app to crash on launch on android because
AppRegistry.registerComponent()takes the name from
app.jsonwhich IS updated but this value is not.
- Created 5 years ago
Top GitHub Comments
1.Try to copy the previous Mainapplication.java file and MainActivity.Java file 2.And Try to rename the package name inside Mainapplication.java file from (old package name) to com.demo (new package name) and similar to MainActivity.Java 3.getMainComponentName() change the return value to “Demo” (your App Name)
This thing still happening today.
To solve this I copied, as explained other comments, previous
MainApplication.java and changed the package declaration with the folder destination
com.newName.nextNewName, and the return of
MainActivity with the name displayed (name key) on