Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bug: Whenever I run an Android emulator, AndroidManifest.xml get changed

Đang mở
#4,898 0 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
android, typescript
Lĩnh vực
cli, mobile-dev

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện sự cố với ionic cap run android -l --external --target Pixel_5_API_33 bằng cách sử dụng thiết lập dự án Capacitor được liệt kê. Kiểm tra thời điểm AndroidManifest.xml thay đổi và AndroidManifest.xml.org được tạo, sau đó xác minh rằng việc khởi động trình giả lập không còn thay đổi định dạng hoặc để lại tệp sao lưu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage

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>
Ngôn ngữ chính
TypeScript
Star
2k
Fork
681
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-cli

Tất cả issue của ionic-team/ionic-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.