使用PGS4A构建游戏时出错

时间:2014-03-14 00:31:00

标签: android python pygame

我用pygame在python中制作一个小游戏。 我想让游戏可用于Android。 希望有PGS4A这个

完成配置后,我必须构建它。 所以我只输入了命令:

python android.py build ~/project/programming/python/gameEngine release install

我最终得到了这个错误:

  BUILD FAILED
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:570: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:622: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:658: Execute failed: java.io.IOException: Cannot run program "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools/aapt" (in directory "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing/library"): error=2, No such file or directory

我该怎么办?我输了。 我正在使用crunch bang linux 11。

3 个答案:

答案 0 :(得分:0)

您可能正在使用64位操作系统,而二进制文件是针对32位库编译的。

我不熟悉CrunchBang的存储库,但你可以试试

sudo apt-get install libc6:i386 libstdc++6:i386 zlib1g:i386 lib32ncurses5

然后再次运行安装程序。

答案 1 :(得分:0)

出于某种原因,这是一个常见的问题,通常在Windows上使用pgs4a 0.9.6。

看看this

确保解压缩文件的目录结构与屏幕截图相同。

您没有安装完整的android-sdk。您需要错误引用的丢失文件。您可以回滚到pgs4a 0.9.4,它不使用这些许可文件或重新安装android-sdk

craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6$ cd android-sdk/
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ ls
add-ons  extras  platforms  platform-tools  SDK Readme.txt  temp  tools
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ cd extras/
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ ls
google
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ cd google/
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ ls
play_apk_expansion  play_licensing
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ cd play_licensing/
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$ ls
library  LICENSE.txt  README.txt  sample  source.properties  test
craig@ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$ 

此链接可能有所帮助。 http://discussion.pychildren.org/t/windows-installation/10

答案 2 :(得分:0)

要修复此问题,请访问此网站http://ady.my/viewer/,并在部分版本中下载最新版本的构建工具。解压缩文件'aapt'和'dx'以及目录'lib'并将这些全部移动到终端上的especified文件夹/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-工具。

代码与以下内容类似:

mv aapt dx lib /home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools

但PGS4A很有用。我建议你使用你在这个链接中找到的Python for Android:http://python-for-android.readthedocs.org/en/latest/