Mengganti Package Name Aplikasi Android di React Native

Halo sobat Metligo. Sudah lama ni saya tidak menulis blog. Mulai sejak tulisan ini sih rencananya saya ingin aktif kembali.

Pada tulisan kali ini saya ingin berbagi sedikit tentang React Native.

Lebih spesifiknya yaitu tentang mengganti Package Name Aplikasi.

Caranya mudah sekali, ikut step-step berikut ini:

I've changed project' subfolder name from: "android/app/src/main/java/MY/APP/OLD_ID/" to: "android/app/src/main/java/MY/APP/NEW_ID/"

Then manually switched the old and new package ids:

In: android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java:

package MY.APP.NEW_ID;
In android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java:

package MY.APP.NEW_ID;
In android/app/src/main/AndroidManifest.xml:

package="MY.APP.NEW_ID"
And in android/app/build.gradle:

applicationId "MY.APP.NEW_ID"
(Optional) In android/app/BUCK:

android_build_config(
  package="MY.APP.NEW_ID"
)
android_resource(
  package="MY.APP.NEW_ID"
)
Gradle' cleaning in the end (in /android folder):

./gradlew clean

Sekian. Semoga bermanfaat bagi temen-temen di sini ya..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top