如何添加多个“工具: 替换”在 Android 清单应用程序?

我使用的库在它的 Manifest 中包含以下内容。

<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"/>

但是,作为应用程序,我用来包括库的设置反过来呢

<application android:allowBackup="false"
android:label="@string/app_name"
android:supportsRtl="false"/>

因此会出现像 库清单中的‘ android: support sRtl = “ true”是必不可少的吗? 它有时会导致错误这样的并购错误

要解决这个问题,我们只需要向 Manifest 应用程序添加以下内容。

tools:replace="android:supportsRtl"

还有

tools:replace="android:allowBackup"

但是,添加两个 tools:replace将在编译中出错。如何组合这两个 tools:replace

我试了下面的方法,没有用。

tools:replace="android:supportsRtl|android:allowBackup"
29746 次浏览

根据保罗在评论中对上述问题的回答,使用下面的方法来解决我的问题。

 tools:replace="android:supportsRtl,android:allowBackup"

例子:-

tools:replace="android:label,android:allowBackup,android:supportsRtl"