gpt4 book ai didi

android - xmlns :tools namespace attribute not reflecting in plugin Element

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:17:12 25 4
gpt4 key购买 nike

我正在开发一个 cordova 插件,我的插件代码需要 xmlns:tools="http://schemas.android.com/tools" 命名空间。所以,我在 Plugin.xml 中添加了相同的内容

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
id="com.sample.cordova"
version="1.0.0">

现在,将插件添加到任何 cordova 项目后,我在 Android list 文件中看不到 xmlns:tools="http://schemas.android.com/tools" 命名空间。这就像

<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.sample.cordova" xmlns:android="http://schemas.android.com/apk/res/android">

根据 cordova Plugin Specification它应该添加 xmlns:tools 命名空间,但它没有发生。任何想法如何实现它

提前致谢。

最佳答案

我遇到了同样的问题

尝试在plugin.xml中加入

<edit-config file="AndroidManifest.xml" target="/manifest" mode="merge">
<manifest xmlns:tools="http://schemas.android.com/tools" />
</edit-config>

它对我有用。

详情 here

关于android - xmlns :tools namespace attribute not reflecting in plugin Element,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32524422/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com