我想把游戏编译到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")有人能帮帮我吗?
发布于 2012-01-07 13:29:20
我要说的是,问题在于代码中的ANDROID变量不是您想要使用的二进制文件的完全限定路径名。
因此,只要您正确配置了PATH环境变量,以便可以找到ANDROID,建议使用shell=True的注释看起来就很合适。
如果不是这样,您可以:
ANDROID变量中提供完整路径subprocess.Popen时使用env参数将您自己的自定义PATH环境变量提供给子进程。有关更多信息,请查看documentation.https://stackoverflow.com/questions/8733534
复制相似问题