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
-
難度 1/5 1-3 小時 新手友好度 88/100
supabase/agent-skills#611 ·
-
難度 1/5 1 小時以內 新手友好度 68/100
polka-codes/test#345 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 92/100
GoogleChromeLabs/project-sesame#217 ·
維護者通常 12 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
solana-foundation/solana-com#2202 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100