我想要complie游戏到android但是......
我遇到Subprocess.py
的问题我收到以下错误消息:
File "D:\Documents and Settings\Kiraler\Pulpit\renpy-apk-6.13.7.1\build.py", line 321, in <module>
make_package<args>
File D:\Documents and Settings\Kiraler\Pulpit\renpy-apk-6.13.7.1\build.py", line 201, in make_package
subprocess.call<[ANDROID, "update", "project", "-p", '.', '-t', android-8]
File "D:\Python27\lib\subprocess.py", line 493, in call
return Popen<*popenargs, **kwargs>.wait<>
File "D:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite>
File "D:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo>
WindowsError: [Error 2] The system cannot find the file specified
模块:
# Update the project to a recent version.
subprocess.call([ANDROID, "update", "project", "-p", '.', '-t', 'android-8'])
shutil.rmtree("assets")
if args.assets:
shutil.copytree(args.assets, "assets")
else:
os.mkdir("assets")
if renpy:
shutil.copytree("engine-assets/common", "assets/common")
有人可以帮助我吗?
答案 0 :(得分:0)
我要说问题是代码中的ANDROID
变量不是您要使用的二进制文件的完全限定路径名。
因此,只要您已正确配置shell=True
环境变量以便找到PATH
,建议使用ANDROID
的评论就会合适。 / p>
如果情况并非如此,您可以:
ANDROID
变量env
时使用subprocess.Popen
参数,为子流程提供自定义的PATH
环境变量。欲获得更多信息,
请查看documentation。