我能做些什么?注射束生成错误'?

时间:2014-12-06 03:31:33

标签: ios xcode

我正在Yosemite 10.10.1上使用XCode 6.6.1构建本机ios应用程序。 也使用Injection for XCode(http://injectionforxcode.com/

运行Inject Source(^ =)时出现错误:

断开连接:/ Users / username / Library / Developer / CoreSimulator / Devices / 1800BDFA-4053-4093-95C3-F38CAA261360 / data / Containers / Data / Application / 619B38FB-E7E0-4BC1-AF48-99DC55576993 at / Users / username / Library / Application Support / Developer / Shared / Xcode / Plug-ins / InjectionPlugin.xcplugin / Contents / Resources / common.pm第51行。 main :: error('Build Failed with status:65。您可能需要打开并编辑t ...')调用/ Users / username / Library / Application Support / Developer / Shared / Xcode / Plug-ins / InjectionPlugin.xcplugin / Contents / Resources / injectSource.pl第386行

我认识到: 连接到“Injection”插件,准备加载x86_64代码。

如何解决此错误?

2 个答案:

答案 0 :(得分:0)

来自常见问题:

  

当我尝试构建它的捆绑包时,我收到错误。怎么了?

     

转换类时注入源需要能够   在一个单独的" InjectionBundle"中编译项目在另一个   目录比通常编译的目录。你可能需要调整   在包项目中包含项目中的路径或框架   干净利落地建设。一旦项目设置了InjectionBundle   子项目可以放在源代码管理中并与其他项目共享   开发者。

http://injectionforxcode.johnholdsworth.com/faq.html

除非您知道无法找到哪个文件,否则可以在框架搜索路径构建设置中设置要递归搜索的项目目录(完成后我会将其重置)。

something like this

除此之外,请确保您正在编辑您希望注射的文件。

答案 1 :(得分:0)

我在OS X项目中遇到了类似的错误:

warning: directory not found for option '-F/Users/nater/Library/Developer/Xcode/DerivedData/my-project-cfewqrudvqrwzqgnqhnibmvyserw/Build/Products/Debug-macosx' framework not found for architecture x86_64
 clang: error: linker command failed with exit code 1 *** Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. ***

在了解注入工作原理并查看编译警告之后,很明显捆绑包正在查看错误的路径。

要注意,don't try to edit来自捆绑项目构建设置的OTHER_LDFLAGS。脚本在构建时设置它。您可以添加框架路径,但我不想为每个注入的项目执行此操作。

解决方案:

  

我能够通过修改插件InjectSource.pl脚本文件来解决这个问题。我删除了macosx文件夹名称之后的-Debug。我运行了inject source命令和it works

应使用以下路径找到插件:~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin

这是一个简单的错误,但希望能帮助其他人。

这应该可能在另一个主题上,但我会在标题后添加它。