python封装为apk,使用buildozer将python文件转换为apk时出现构建错误

I have made a simple app in python using Kivy and now I want this to be converted into an apk file so that I can use it in my android mobile.

But constantly I am getting following build error while converting it. I am using buildozer for building an apk file.

I have checked for any missing files or directory, but that's not the case. OS : UBUNTU 12.04. The Error is :

[aapt] ~/.buildozer/android/platform/android-sdk-21/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

BUILD FAILED

~/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:645: The following error occurred while executing this line:

~/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:683: null returned: 127

Total time: 1 second

.

.

.

assets/private.mp3: /home/manish/kivy/.buildozer/android/app/sitecustomize.pyo

Traceback (most recent call last):

File "build.py", line 412, in

make_package(args)

File "build.py", line 336, in make_package

subprocess.check_call([ANT, arg])

File "/usr/lib/python2.7/subprocess.py", line 511, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1

# Command failed: /usr/bin/python2.7 build.py --name 'My Application' --version 1.0 --package org.test.myapp --private /home/manish/kivy/.buildozer/android/app --sdk 14 --minsdk 8 --orientation landscape --window debug

解决方案

We need to install ia32libs. use " sudo apt-get install ia32-libs " command on ubuntu. I got this question's answer on IRC channel of kivy and it worked for me. Initially i have not installed it as it is for 32-bit system. They said that android tools still require us to download and install ia32-libs on 64bit systems.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值