Change appId from io.ionic.starter not fully working on Android

I started with the standard appId: io.ionic.starter but now I want to change it.
I removed the “android” folder, renamed the appId in capacitor.config.json and then npx cap add andoid again. The appId was also updated in the AndroidManifest.xml , but when I’m running my app, this error comes:

Error while executing: am start -n "io.ionic.starter/com.test.myapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=io.ionic.starter/com.test.myapp.MainActivity }
Error type 3
Error: Activity class {io.ionic.starter/com.test.myapp.MainActivity} does not exist.

Error while Launching activity

I searched for io.ionic.starter, but there is nothing left with that name.

Am I missing something?

2 Likes

I had the exact same problem.

I fixed it by following the Android troubleshooting guide at Capacitor - build cross platform apps with the web

The step that worked for me:

  1. Open Android Studio
  2. Click File → Invalidate Caches / Restart…
2 Likes