you can simply use react-native-rename npm package.
Install using
npm install react-native-rename -g
Then from the root of your React Native project execute the following
react-native-rename "MyApp" -b com.mycompany.myapp
react-native-rename on npm
but notice that, this lib remove your MainActivity.java
and MainApplication.java
.
before changing your package name, give a backup from this two file and, after changing package name just put it back to their place. this solution work for me
more info: react-native-rename