【问题标题】:Cordova plugin with asset带有资产的 Cordova 插件
【发布时间】:2014-11-17 14:27:15
【问题描述】:

我想写一个包含我的资产文件(图片,一些JSON文件)的简单的cordova插件(适用于android、ios、 ...)

我希望看到一个简单的插件源作为一个 hello world 来学习如何在主应用程序中使用插件资产
例如如何引用属于插件的图像源文件以及cordova插件如何工作。

感谢您的关注,并为我糟糕的英语水平感到抱歉。

【问题讨论】:

  • 有关于这个问题的消息吗?

标签: android ios cordova phonegap-plugins cordova-plugins


【解决方案1】:

plugin.xml 文件中,使用类似:

<resource-file src="FooPluginStrings.xml" target="res/values/FooPluginStrings.xml" />
OR
<resource-file src="src/android/assets/small.pdf" target="assets/small.pdf" />

有关详细信息,请阅读@daserge 发布的插件规范。

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 2018-12-17
    • 2021-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-17
    • 2015-03-21
    相关资源
    最近更新 更多