You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When modifying the applicationId in capacitor.config.ts, say from io.ionic.starter to my.own.id, and subsequently running cap sync android, the Android project's corresponding package in MainActivity.java and namespace in app/build.gradle should be updated.
However, using Ionic's VS Code extension to change your Android Bundle Id ensures not only the proper update of these aspects but also alters the folder structure where MainActivity.java is located. For instance, the file path would shift from android/app/src/main/java/io/ionic/starter/MainActivity.java to android/app/src/main/java/my/own/id/MainActivity.java. Such a change doesn't occur when simply running cap sync android.
The crux of the issue lies in understanding the significance of having a folder structure in MainActivity.java closely aligned with the applicationId. In other words, how crucial is it for an Android app, with applicationId set as my.own.id, to position its MainActivity.java in the corresponding folder structure, i.e., android/app/src/main/java/my/own/id/MainActivity.java ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When modifying the
applicationId
incapacitor.config.ts
, say fromio.ionic.starter
tomy.own.id
, and subsequently runningcap sync android
, the Android project's corresponding package inMainActivity.java
and namespace inapp/build.gradle
should be updated.However, using Ionic's VS Code extension to change your Android Bundle Id ensures not only the proper update of these aspects but also alters the folder structure where
MainActivity.java
is located. For instance, the file path would shift fromandroid/app/src/main/java/io/ionic/starter/MainActivity.java
toandroid/app/src/main/java/my/own/id/MainActivity.java
. Such a change doesn't occur when simply runningcap sync android
.The crux of the issue lies in understanding the significance of having a folder structure in
MainActivity.java
closely aligned with the applicationId. In other words, how crucial is it for an Android app, with applicationId set asmy.own.id
, to position itsMainActivity.java
in the corresponding folder structure, i.e.,android/app/src/main/java/my/own/id/MainActivity.java
?Beta Was this translation helpful? Give feedback.
All reactions