简体   繁体   English

Xcode中Kivy应用的构建失败-无法打开文件'generate-ios-source-and-headers.py'

[英]Build fails for Kivy app in Xcode - can't open file 'generate-ios-source-and-headers.py'

I am trying to test a Kivy app on my iPhone, but when I try building it, I get the following error... 我正在尝试在iPhone上测试Kivy应用,但是当我尝试构建它时,出现以下错误...

/usr/bin/python: can't open file 'generate-ios-source-and-headers.py': [Errno 2] No such file or directory

According to the error, this happens when trying to run custom shell script 'Generate Source and Headers'. 根据该错误,在尝试运行自定义外壳程序脚本“ Generate Source and Headers”时会发生这种情况。 This script contains the following... 该脚本包含以下内容...

#!/bin/sh
/usr/bin/python generate-ios-source-and-headers.py

I followed the instructions here , which uses kivy-ios to create an xcode project for the kivy app. 我按照此处的说明进行操作,该说明使用kivy-ios为kivy应用程序创建xcode项目。 The missing file, 'generate-ios-source-and-headers.py', is in my kivy-ios package (kivy-ios > tmp > libffi-3.0.13 ), but for some reason when Xcode builds the app, that file is not found. 丢失的文件“ generate-ios-source-and-headers.py”位于我的kivy-ios包中(kivy-ios> tmp> libffi-3.0.13),但是由于某些原因,当Xcode构建该应用程序时,找不到文件。

I've made sure my homebrew is updated and I think I've properly configured the xcode build settings. 我确保自己的自制软件已更新,并且我认为我已经正确配置了xcode构建设置。

How do I fix this error? 如何解决此错误? Thanks. 谢谢。

I don't see the relation between Xcode and this error. 我看不到Xcode和此错误之间的关系。 When Xcode build the app, it has nothing to compile from the distribution, because you compile the whole thing before with tools/build-all.sh . 当Xcode构建应用程序时,它tools/build-all.sh从发行版进行编译,因为您之前已经使用tools/build-all.sh编译了整个tools/build-all.sh

Xcode is just executing our script to fetch your application source and package it, and compile the main.m. Xcode只是在执行我们的脚本来获取您的应用程序源并将其打包,然后编译main.m。

I guess your Xcode project is corrupted somehow, and include invalid steps. 我猜您的Xcode项目以某种方式损坏了,并且包含无效的步骤。 It would be nice to debug it. 调试它会很好。 Feel free to share your xcodeproj :) 随时分享您的xcodeproj :)

The solution was to remove symlinks before running the first Xcode build, by running this command in the kivy-ios folder 解决方案是在运行第一个Xcode构建之前删除符号链接,方法是在kivy-ios文件夹中运行此命令

find ./ -type l -exec rm {} \;

Also, after every failed Xcode build, the YourApp folder needs to be deleted. 同样,在每次失败的Xcode构建之后,都需要删除YourApp文件夹。

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

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