React Native

How to change Android package name in react-native

Posted On
Posted By Neha Dwivedi

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.bonfires.

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.bonfires;
Now change the package name of project is done.

And if any other query/issue then please comment.

Happy Coding Guyz

Related Post

leave a Comment

Latest Post

React Native

How to generate keytool for android release and debug build

Read More
Posted On
React Native

How to finding index at the time of scrolling on flatlist in react native

Read More
Posted On
React Native

How to exit from the app with user confirmation in react native

Read More
Posted On
React Native

How to open phone default calendar in react-native

Read More
Posted On
React Native

How to change Android package name in react-native

Read More
Posted On