一些不常见的AndroidManifest.xml标签

来源:互联网 发布:网络打字员是真的吗 编辑:程序博客网 时间:2024/04/25 13:32
<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"/>
原创粉丝点击