Xcode 中的 Cordova 错误 - 没有这样的文件或目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12723092/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:41:54  来源:igfitidea点击:

Cordova error in Xcode - No such file or directory

iphonexcodecordova

提问by Ruud

I've been trying to create a Cordova / Phonegap application in Xcode on a new computer. But it doesn't seem to work. When I run the application on either a simulator or my iPhone I get an error message saying that 'libCordova.a' is not found.

我一直在尝试在新计算机上的 Xcode 中创建 Cordova/Phonegap 应用程序。但它似乎不起作用。当我在模拟器或 iPhone 上运行该应用程序时,我收到一条错误消息,指出未找到“libCordova.a”。

1 error message and 5 issues:

1 条错误消息和 5 个问题:

/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject.xcodeproj
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject.xcodeproj Missing "[email protected]" launch image
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/AppDelegate.m
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/AppDelegate.m:73:25: 'invokeString' is deprecated
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m:117:15: 'invokeString' is deprecated
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m:121:93: 'invokeString' is deprecated
clang: error: no such file or directory: '/Users/Tim/Library/Developer/Xcode/DerivedData/FirstProject-ctanrqwggcfoubbeqbjrfvcqozpg/Build/Products/Debug-iphoneos/libCordova.a'
  • Cordova version 2.1.0
  • Xcode version 4.5.1
  • 科尔多瓦版本 2.1.0
  • Xcode 版本 4.5.1

I have not been able to install the latest cordova on my computer, on version 2.0.0 there was an installation program but in the latest version this is gone? And I already set the 'Build Active Architecture Only' to Yes and the 'Build Location' to Unique.

我无法在我的计算机上安装最新的cordova,在2.0.0 版上有一个安装程序,但在最新版本中没有了?我已经将“仅构建活动架构”设置为“是”,将“构建位置”设置为唯一。

Thank you very much in advance.

非常感谢您提前。

回答by Think Graphical

I've had exactly the same error. The problem was that I hadn't set the 'Build Active Architecture Only' for both projects. Your main project & the CordovaLib.xcodeproj.

我有完全相同的错误。问题是我没有为两个项目设置“仅构建活动架构”。您的主要项目和 CordovaLib.xcodeproj。

Hope this helps!

希望这可以帮助!

回答by Neeku

This solved my problem:

这解决了我的问题:

  • Open your project in Xcode.
  • Click on your project.
  • Click on your project under Targets.
  • Hit the build phases tab.
  • Open “Copy Bundle Resources” near the bottom.
  • Look for any resources listed in red, and drag/drop them manually there.
  • 在 Xcode 中打开您的项目。
  • 单击您的项目。
  • 在目标下单击您的项目。
  • 点击构建阶段选项卡。
  • 打开底部附近的“复制捆绑资源”。
  • 查找任何以红色列出的资源,然后手动将它们拖放到那里。

Problem solved!

问题解决了!

回答by Francesco

in the CordovaLib Build Settings. Under Architectures -> Valid Architectures, I removed armv6. this worked for me! (iphone 4s phonegap 2.2)

在 CordovaLib 构建设置中。在 Architectures -> Valid Architectures 下,我删除了 armv6。这对我有用!(iphone 4s phonegap 2.2)

回答by codemonkey

The installer is gone because it is no longer required. Have you followed allthe steps from the very helpful getting started guide here? http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS

安装程序已消失,因为不再需要它。您是否遵循了此处非常有用的入门指南中的所有步骤?http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS