Change Package Name in Android Studio

Change Package Name in Android Studio

Posted by


नीचे मैं Android Studio में package name (जैसे com.example.app) को पूरी तरह बदलने का step-by-step तरीका दे रहा हूँ — बिलकुल safe और 100% working method।


Step-by-Step: Change Package Name in Android Studio

Example:

Suppose your current package name is:

com.example.myapp

And you want to change it to:

com.kaka.newapp

Change Package Name in Android Studio
Change Package Name in Android Studio

Step 1: Show Package as Directory Structure

  • Go to: Android Studio > Project (Left side panel)
  • Change view from Android to Project or Project Files
  • Navigate to: app > java > com > example > myapp

Step 2: Right Click and Rename

Now, right-click each package folder from last to first:

a) Rename myapp folder

  • Right-click → Refactor > Rename
  • Click Rename Package → Enter newapp

b) Rename example to kanika

  • Right-click → Refactor > Rename
  • Click Rename Package → Enter kanika

c) Rename com if needed (usually not required)

Do NOT use “Rename Directory” — always use “Rename Package”


Step 3: Update AndroidManifest.xml

<manifest package="com.kaka.newapp">

Update this line manually to match the new name.


Step 4: Update in build.gradle

In app/build.gradle, check if this line exists:

applicationId "com.example.myapp"

Replace with:

applicationId "com.kaka.newapp"

Step 5: Clean and Rebuild

  • Click: Build > Clean Project
  • Then: Build > Rebuild Project

How to add domain to Cloudflare