How to change Android package name in react-native

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 –

https://www.itechinsiders.com/ - react native package name
https://www.itechinsiders.com/ – react native package name

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

Related Post

One Reply to “How to change Android package name in react-native”

Comments are closed.