gpt4 book ai didi

cordova - 使用 Plugman 在 Phonegap 中加载 Barcode 插件

转载 作者:行者123 更新时间:2023-12-01 02:24:24 24 4
gpt4 key购买 nike

刚开始使用 PhoneGaps 命令行界面和新的 Plugman 命令。这是我为创建项目而进行的调用

Alex-Britez-MBP:barcodeApp abritez$ phonegap create /Users/abritez/Documents/Projects/phonegap/barcodeApp --name "barcodeApp" --id "com.company.barcodeApp"

有回应
  phonegap  created project at /Users/abritez/Documents/Projects/phonegap/barcodeApp

然后我尝试加载从 ( https://github.com/wildabeast/BarcodeScanner ) 下载的插件
 Alex-Britez-MBP:barcodeApp abritez$ plugman --platform ios --project /Users/abritez/Documents/Projects/phonegap/barcodeApp/platforms/ios --plugin /Users/abritez/Documents/Projects/phonegap/_plugins/barcodeReader

我在终端上收到以下错误
grafting xml at selector "plugins" from "/Users/abritez/Documents/Projects/phonegap/barcodeApp/platforms/ios/barcodeApp/config.xml" during config install went bad :(

我检查了目录,似乎文件已成功添加,但在模拟器和设备上运行应用程序均失败。

我哪里出错了?

更新:
我确实注意到在 plugin.xml 中有一行说明
<config-file target="config.xml" parent="plugins">
<plugin name="BarcodeScanner" value="CDVBarcodeScanner"/>
</config-file>

我看到 2 个插件文件夹,一个在 cordova.plugin 中,另一个在顶层。好奇是不是这个问题。

我注意到的另一件有趣的事情是 PlugMan 创建的目录是如何创建的。这似乎不正确。

截图在这里:
Directory Screenshot

最佳答案

我有这个问题,我解决了它附加 <plugins></plugins>以上 </widget>在我的 config.xml .但这听起来像是 plugins 的临时解决方案标签似乎在新版本中被弃用(需要确认,文档真的很糟糕)...

关于cordova - 使用 Plugman 在 Phonegap 中加载 Barcode 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17795899/

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