bug: Whenever I run an Android emulator, AndroidManifest.xml get changed
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, typescript
- 领域
- cli, mobile-dev
调研方向
首先,使用列出的 Capacitor 项目设置,通过 ionic cap run android -l --external --target Pixel_5_API_33 重现该问题。检查 AndroidManifest.xml 何时发生更改以及何时创建 AndroidManifest.xml.org,然后验证模拟器启动后不再更改格式,也不会留下备份文件。
由索引模型根据 Issue 内容生成。
描述
Description:
I am using Ionic 6 with React. I run the following command to start up Android emulator:
ionic cap run android -l --external --target Pixel_5_API_33
The emulator starts up, but right away the AndroidManifest.xml file get updated and an AndroidManifest.xml.org file is added.
When I shut the emulator down, everything goes back to normal. In other words, the changes to the AndroidManifest.xml are reverted and the AndroidManifest.xml.org is deleted.
I’ve not seen any equivalent behavior with iOS.
Steps to Reproduce:
You can reproduce this by creating a new project ionic start photo-gallery tabs --type=react --capacitor
Then add android to the project ionic cap add android
Then start up an emulator: ionic cap run android -l --external --target Pixel_5_API_33
Output:
My ionic info:
Ionic:
Ionic CLI : 6.20.1 (/Users/nathan/.local/share/yarn/global/node_modules/@ionic/cli)
Capacitor:
Capacitor CLI : 4.0.1
@capacitor/android : 4.0.1
@capacitor/core : 4.0.1
@capacitor/ios : 4.0.1
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v16.15.1 (/Users/nathan/.asdf/installs/nodejs/16.15.1/bin/node)
npm : 8.11.0
OS : macOS Monterey
Other Information:
The settings (i.e. data) in the file does not change. Only the formatting. It changes from:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.todos.mobile">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="dev.todos.mobile.MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:screenOrientation="fullSensor"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
To:
<?xml version='1.0' encoding='utf-8'?>
<manifest package="dev.todos.mobile" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:exported="true" android:label="@string/title_activity_main" android:launchMode="singleTask" android:name="dev.todos.mobile.MainActivity" android:screenOrientation="fullSensor" android:theme="@style/AppTheme.NoActionBarLaunch">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 681
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ionic-team/ionic-cli 的其他 Issue
-
triage
难度 1/5 1 小时以内 新手友好度 65/100
ionic-team/ionic-cli#5016 ·
-
triage
难度 5/5 一周以上 新手友好度 15/100
ionic-team/ionic-cli#5131 ·
-
triage
难度 3/5 1-2 天 新手友好度 56/100
ionic-team/ionic-cli#5130 ·
-
triage
难度 3/5 1-2 天 新手友好度 72/100
ionic-team/ionic-cli#5129 ·
-
triage
难度 3/5 1-2 天 新手友好度 42/100
ionic-team/ionic-cli#5127 · 2 条评论 ·
查看 ionic-team/ionic-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/vscode-livepreview#876 ·
维护者通常 1 天内回复
-
needs-triage
难度 1/5 1 小时以内 新手友好度 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"未关闭Needs Triage Type/Bug
难度 2/5 1-3 小时 新手友好度 68/100
wso2/product-integrator#2585 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
design
难度 2/5 1-3 小时 新手友好度 72/100
MTES-MCT/monitor-field#119 ·
维护者通常 1 天内回复