使用Kivy中的build.py脚本编译错误

时间:2014-02-05 15:42:42

标签: android python kivy

我最近安装了一个Ubuntu 13.10虚拟机并为其设置了Kivy开发环境,即克隆kivy,使用distribute.sh构建分发版并使用build.py脚本构建apk。在将我的项目打包到APK文件并运行./build.py脚本时,我遇到以下错误:

[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

BUILD FAILED
/home/administrator/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/administrator/sdk/tools/ant/build.xml:659: null returned: 127

Total time: 1 second
Traceback (most recent call last):
  File "./build.py", line 412, in <module>
    make_package(args)
  File "./build.py", line 336, in make_package
    subprocess.check_call([ANT, arg])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1 re
这真是令人困惑!我已经下载了SDK和NDK,并在设置环境变量时指出了这些文件的位置。我错过了什么?

1 个答案:

答案 0 :(得分:4)

我最终解决了它!而线索就在这里

[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解释:我正在开发的Linux发行版是在64位机器上,因此需要一些c ++库才能运行32位应用程序,所以我做的是以下内容:

$ sudo apt-get install lib32stdc++6

它已经解决了!