# Change Package Name

All Android apps have a package name. The package name uniquely identifies the app on the device; it is also unique in the Google Play store.

In Motors App there is a specific package name that is used: **com.stylemixthemes.motors** You should change it to your own package name, for example, **com.mycompany.name** where the mycompany will be the name of your brand.

To change the package name you need to follow some steps.

In your **Project panel**, click on the little gear icon.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FddMuL2wVVNx2QVyuxZsv%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA35.png?alt=media&#x26;token=2577acc9-4d60-44a3-9cf4-a74b356833bd" alt=""><figcaption></figcaption></figure>

Uncheck the option Compact Empty Middle Packages

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2Fkh2upit3rDnjJohvz5XP%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA36.png?alt=media&#x26;token=5739114f-19ec-4d19-aae3-1d87053fb135" alt=""><figcaption></figcaption></figure>

Your package directory will be broken into individual directories

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FkJSRGKaxfRJ4R1g3Jlga%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA37.png?alt=media&#x26;token=c62ed0ed-2317-4e0d-a364-8dad54d9d18b" alt=""><figcaption></figcaption></figure>

Individually select the directory you want to rename, and follow these steps:

Right-click it >> Select **Refactor** >> Click on **Rename**

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FOESuhxMFssS8cCY4S4jQ%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA38.png?alt=media&#x26;token=bbf316a5-0a8f-410f-8e89-4b8d5e16fb6c" alt=""><figcaption></figcaption></figure>

Enter the new name and hit **Refactor**

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2Fq7VOWVOm4NiwMqVhvvVD%2FScreenshot_25.png?alt=media&#x26;token=d77de1c7-9be7-4c4e-abed-6d9a8b0633c4" alt=""><figcaption></figcaption></figure>

Click **Do Refactor** in the bottom and wait a minute to let Android Studio update all changes.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2F3hYQsejXTv5XAuoVKtW7%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA40.png?alt=media&#x26;token=dfe3a833-fdd4-477f-bf53-911371247e36" alt=""><figcaption></figcaption></figure>

> Note: When renaming com in Android Studio, it might give a warning. In such case, select Rename All.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FGYUVajPBKtFDiq7iUv8z%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA41.png?alt=media&#x26;token=6e412ff5-f6f3-4d1b-9b9d-7b7e504344e5" alt=""><figcaption></figcaption></figure>

Edit **build.gradle (Module: app)** file in the **Gradle Scripts**

Find the **54th line** and change “com.stylemixthemes.motors” to your package name.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FY2h1LC5cw86kR1kpkpeo%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA42.png?alt=media&#x26;token=3964106b-c7b6-4453-a485-5a52da76f3cf" alt=""><figcaption></figcaption></figure>

After that click on **Sync Now** to synchronize Gradle.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2F1ozT9KULjlcdb3vNCiXz%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA43.png?alt=media&#x26;token=e0be6034-d7d7-42ce-a8cf-5a6731af3c88" alt=""><figcaption></figcaption></figure>

Then go to **App > Manifests** and edit the file AndroidManifest.xml if it wasn't changed automatically.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2FBAB3awXpCtShsUmQjrYg%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA44.png?alt=media&#x26;token=8291e2f8-ef16-47b3-a4e0-e9ed82f98d8a" alt=""><figcaption></figcaption></figure>

From the Android Studio menu open **Build** and click on the **Clean Project**. Wait until Android Studio finishes the process.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2F9IuQghHhfVCjjqfOc0uP%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA45.png?alt=media&#x26;token=1c727b00-00fb-4c56-96eb-f9044cc51081" alt=""><figcaption></figcaption></figure>

After that, in the same menu find and launch **Rebuild Project**.

<figure><img src="https://649870283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDPXy_4le1iZ83O009c%2Fuploads%2Fry4UVELCeTBEqnM2PzZR%2F%D0%A0%D0%B8%D1%81%D1%83%D0%BD%D0%BE%D0%BA46.png?alt=media&#x26;token=4dfa45e8-d908-4947-8dda-67fe668111cf" alt=""><figcaption></figcaption></figure>

This is the final step in changing the package name.
