简体   繁体   English

Cordova-在iOS中添加插件的问题

[英]Cordova - issue adding plugins in iOS

I am getting some strange issue while adding plugin in iOS using CLI. 使用CLI在iOS中添加插件时遇到一些奇怪的问题。 Executed below commands in Terminal, 在终端中的以下命令中执行,

  1. cordova create Documents/Work/hello com.example.hello hello world cordova创建Documents / Work / hello com.example.hello您好世界
  2. cordova platform add ios 科尔多瓦平台添加ios
  3. cordova plugin add org.apache.cordova.device cordova插件添加org.apache.cordova.device
  4. cordova build 科尔多瓦建立

But the build is failing & showing the below message, 但是构建失败并显示以下消息,

error: no such file or directory: '/Users/gtmac/Documents/Work/hello/platforms/ios/helloworld/Plugins/org.apache.cordova.device/CDVDevice.m' clang: error: no input files 错误:无此类文件或目录:'/Users/gtmac/Documents/Work/hello/platforms/ios/helloworld/Plugins/org.apache.cordova.device/CDVDevice.m'clang:错误:无输入文件

** BUILD FAILED ** **建立失败**

When I add any plugin, .m & .h files are not getting copied to the Platforms/Plugins folder. 当我添加任何插件时,.m和.h文件不会被复制到Platforms / Plugins文件夹中。 But the files are present in the Plugins folder in the root directory. 但是这些文件位于根目录的Plugins文件夹中。

There is this known issue with Cordova, where the build fails if the project's name has the first letter in lowercase . Cordova存在一个已知问题,如果项目名称的首字母小写 ,则构建将失败。 It has been reported back in 2014, but still not fixed, nor mentioned in the docs/no specification in the errors. 早在2014年就已报告此错误,但仍未修复,也未在docs / no规范中提及错误。

So keep the app's project name starting with an uppercase. 因此,请保持应用程序的项目名称以大写字母开头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM