配置 Android
配置 AndroidManifest.xml
Android 应用通过 AndroidManifest.xml 文件管理权限、设备功能和其他设置,该文件位于 android/app/src/main/AndroidManifest.xml。
AndroidManifest.xml可以通过@style和@string引用android/app/src/main/res/values目录下的其他文件,例如styles.xml和strings.xml,了解更多关于 Android 资源 的信息。
本文介绍了您需要对应用进行的基本修改。阅读 Android Manifest 文档 可以了解更多内容。
更改包 ID
要更改应用的包 ID(在 Android 中又称 应用 ID),请编辑 android/app/build.gradle 文件顶部的 applicationId:
defaultConfig {
- applicationId "com.capacitorjs.app"
+ applicationId "com.mycompany.myapp"