如何覆盖Flutter APK清单?

问题描述 投票:0回答:3

我正在更新Flutter项目中的Android Manifest配置。但是,有一个建议的修复程序,我在flutter中使用的库中找不到。但是在分析APK后,我通过APK分析器在APK中的AndroidManifest.xml中找到了它]

enter image description here

上面显示的是我必须更新的配置。一个非常简单的更新,我必须替换android:exported为false。

我需要帮助找出一种实际更新此清单的方法,因为即使浏览了包含在上面包含代码/配置的项目中的软件包的每个清单文件,我也看不到任何文件。

android flutter android-manifest
3个回答
0
投票

在清单中添加此内容

<application
tools:replace="android:label"
android:name="io.flutter.app.FlutterApplication"
android:label="flutterwp" 
android:icon="@mipmap/ic_launcher">

0
投票

您可以简单地编辑此AndroidManifest.xml文件。


0
投票

使用tools:replace属性。>>

official docs检出以下示例:

  • 在图书馆
<activity android:name="com.example.ActivityOne"
    android:theme="@oldtheme"
    android:exported="false"
    android:windowSoftInputMode="stateUnchanged" />
  • 您自己的实现
<activity android:name="com.example.ActivityOne"
    android:theme="@newtheme"
    android:exported="true"
    android:screenOrientation="portrait"
    tools:replace="android:theme,android:exported"
© www.soinside.com 2019 - 2024. All rights reserved.