Android package name changing in react-native –
Here we are going to learn “How to change Android package name in react-native“.
I’m a big fan of React Native, because it is very easy to implement complicated concepts and designs, in below example i am going to explain you in detail how to change the name of android package in very simple way.
Output Example –
Step1:
There are a file name with android/app/BUCK open the file and
find these lines then change it with your desired name.
android_build_config(
name = "build_config",
package = "com.connect.bonfires”,//change this name
)
Android_resource(
name = "res",
package = "com.connect.bonfires",//change this name
res = "src/main/res",
)
Step2:
Open 4nother file name/location is android/app/build.gradle
and find the
defaultConfig {
applicationId "com.connect.bonfires" //change this name
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
missingDimensionStrategy 'react-native-camera', 'general'
}
Step3:
Open another file
android/app/src/main/manifest.xml
and find
this line above of the project change the package name.
Step4:
Open another file
android/app/src/main/java/com/appname/MainActivity.java
and Find this line above of the project change the
package name : package com.connect.test.
Step5:
Open another file
android/app/src/main/java/com/appname/MainApplication.java
and Find this line above of the project change
the package name : package com.connect.test;
Now change the package name of project is done.
And you can find my post on medium as well click here please follow me on medium as well.
So the topic “How to change Android package name in react-native is completed, “you can find the next issue list here.
And if any other query/issue then please comment.
Happy Coding Guyz
Hi, I am a professional Ionic and React Native Pixel Perfect App Designer and Developer, with expertise in Client Communication, Bug Fixing, Third Party Lib, Version Control Tools, Requirement Understanding, and managing teams, I have 6+ years of experience in the same domain as well as in Codeigniter, JS, IoT, and more than 10 other languages. For the last 6+ years, not a single day went without design/development.
Please follow me on Medium: https://nehadwivedi1004.medium.com/
Good article