# Trouble changing package\_name in Ionic 5

**URL:** <https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992>\
**Category:** Ionic Framework\
**Created:** [May 7, 2020, 9:17pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992 "2020-05-07T21:17:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wrybread](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@Wrybread](https://forum.ionicframework.com/u/Wrybread)\
**Post date:** [May 7, 2020, 9:17pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/1 "2020-05-07T21:17:10Z")

</div>

I’m trying to submit my app built with Ionic 5 / capacitor, and the Play Store keeps rejecting the bundle:

> [@](#):
>
> You need to use a different package name because “io.ionic.starter” already exists in Google Play.

In Android Studio I’ve opened AndroidManiest.xml and changed that first line:

[quote][/quote]

And I’ve opened strings.xml:

> [@](#):
>
> \<?xml version='1.0' encoding='utf-8'?\> MY APP NAME MY APP NAME MY PACKAGE NAME io.ionic.starter99sf

But somehow when I build the bundle it’s retaining the package name “io.ionic.starter”.

I’m building in Android Studio by clicking Build → Generate Signed Bundle / APK → Android App Bundle → Release.

Do I need to change the package name anywhere else?

Do I need to do anything after changing the package name?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 7, 2020, 9:35pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/2 "2020-05-07T21:35:21Z")

</div>

> [@Wrybread](#):
>
> Do I need to change the package name anywhere else?

“appId” in `capacitor.config.json`.

---

<div class="post-metadata">

**Author:** ![Wrybread](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@Wrybread](https://forum.ionicframework.com/u/Wrybread)\
**Post date:** [May 7, 2020, 9:36pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/3 "2020-05-07T21:36:18Z")

</div>

> [@rapropos](#):
>
> appId” in `capacitor.config.json` .

Strange, it’s already changed there.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 7, 2020, 9:39pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/4 "2020-05-07T21:39:32Z")

</div>

Then blow away all build directories and rebuild the app from scratch.

---

<div class="post-metadata">

**Author:** ![Wrybread](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@Wrybread](https://forum.ionicframework.com/u/Wrybread)\
**Post date:** [May 7, 2020, 9:46pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/5 "2020-05-07T21:46:31Z")

</div>

Sorry I’m new to Ionic. Any hints on which directories to delete, or to keep? I’m worried about deleting something I shouldn’t.

I’m only building for Android, should I just delete the /Android directory? Or should I do a build remove android?

Or?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 7, 2020, 9:50pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/6 "2020-05-07T21:50:50Z")

</div>

I would nuke `www`, rebuild, and then `npx cap sync`.

---

<div class="post-metadata">

**Author:** ![Wrybread](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@Wrybread](https://forum.ionicframework.com/u/Wrybread)\
**Post date:** [May 7, 2020, 10:05pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/7 "2020-05-07T22:05:02Z")

</div>

Wow, still getting the issue. Here’s what I did:

- closed Android Studio

- deleted www directory

- ran “ionic capacitor build android --prod”. That regenerated the www directory.

- run “npx cap sync”

Then in Android Studio I run Build -\> Generate Signed Bundle or APK -\> Android App Bundle -\> Release. That builds app-release.aab.

And then I upload it to the Play Store and get the error cited in first post about “io.ionic.starter” already existing in the app store.

In Android Studio I open AndroidManifest.xml and there’s no mention of that ID. Same with strings.xml. And opening capacitor.config.json doesn’t have it either.

Any idea what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![Wrybread](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@Wrybread](https://forum.ionicframework.com/u/Wrybread)\
**Post date:** [May 7, 2020, 11:53pm UTC](https://forum.ionicframework.com/t/trouble-changing-package-name-in-ionic-5/188992/8 "2020-05-07T23:53:28Z")

</div>

Wow, I think I found it. Only took 3 hours. In Android Studio, under Gradle Scripts, find file “build.gradle (Module:app)” and change applicationId there.
