一些不常见的AndroidManifest.xml标签

<key-sets>

标签介绍A KeySet can be used explicitly to represent a trust relationship with other applications on the device.

<!-- Groups signing keys into a {@code KeySet} for easier reference in
        other APIs. However, currently no APIs use this. -->
<attr name="keySet" />
<declare-styleable name="AndroidManifestPublicKey">
    <attr name="name" />
    <attr name="value" />
</declare-styleable>
<declare-styleable name="AndroidManifestKeySet">
    <attr name="name" />
</declare-styleable>

<!-- Associate declared KeySets with upgrading capability. -->
<declare-styleable name="AndroidManifestUpgradeKeySet" parent="AndroidManifest">
  <attr name="name" />
</declare-styleable>

示例:

<key-sets>
    <key-set android:name="A" >
      <public-key android:name="keyA"
               android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgK..." />
    </key-set>
    <key-set android:name="B" >
      <public-key android:name="keyB"
                  android:value="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBC...." />
    </key-set>
    <upgrade-key-set android:name="A"/>
    <upgrade-key-set android:name="B"/>
</key-sets>

<overlay>

标签介绍

<!-- Attributes relating to resource overlay packages. -->
<declare-styleable name="AndroidManifestResourceOverlay" parent="AndroidManifest">
    <!-- Package name of base package whose resources will be overlaid. -->
    <attr name="targetPackage" />

    <!-- Load order of overlay package. -->
    <attr name="priority" />

</declare-styleable>

示例:

<overlay android:targetPackage="com.mogujie" android:priority="1"/>

targetPackage的值必须要与目标应用的package值一样(反编译可以获取),
priority的值是针对一个目标apk的资源可以被多个overlay apk更改”而设置的一个优先级,值越大优先级越高
可参考博客 Android 运行时资源替换—-Runtime Resource Overlay


<original-package>

标签介绍

<!-- Private tag to declare the original package name that this package is
     based on.  Only used for packages installed in the system image.  If
     given, and different than the actual package name, and the given
     original package was previously installed on the device but the new
     one was not, then the data for the old one will be renamed to be
     for the new package.

     <p>This appears as a child tag of the root
     {@link #AndroidManifest manifest} tag. -->
<declare-styleable name="AndroidManifestOriginalPackage" parent="AndroidManifest">
    <attr name="name" />
</declare-styleable>

示例:

<original-package android:name="com.mediatek.call"/>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值