【问题标题】:An error while building a game with PGS4A使用 PGS4A 构建游戏时出错
【发布时间】:2014-04-19 02:06:15
【问题描述】:

我用 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。

【问题讨论】:

    标签: android python pygame


    【解决方案1】:

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

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

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

    然后再次运行安装程序。

    【讨论】:

      【解决方案2】:

      由于某种原因,这是一个常见问题,通常在 pgs4a 0.9.6 的 Windows 上发生。

      看看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

      【讨论】:

        【解决方案3】:

        要修复它,请访问此站点 http://ady.my/viewer/,然后在构建部分下载最新版本的构建工具。提取文件'aapt'和'dx'以及目录'lib'并将它们全部移动到终端/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 已经过时了。我建议您使用适用于 Android 的 Python,您可以在此链接中找到:http://python-for-android.readthedocs.org/en/latest/

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2019-12-09
          • 1970-01-01
          • 1970-01-01
          • 2013-01-21
          • 1970-01-01
          • 2019-05-15
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多