简体   繁体   English

Buildozer内置APK无法正常工作

[英]Buildozer built apk not working

For about 2 days from now I am trying to compile a simple Hello World app using Buildozer . 从现在开始大约2天,我正在尝试使用Buildozer编译一个简单的Hello World应用程序。 I've tried it on several computers and it didn't work on any of them. 我已经在几台计算机上尝试过了,但是在其中任何一台计算机上都没有用。 I tried to do the simplest way possible to find out the problem, but I couldn't and it is getting really annoying now. 我试图以最简单的方法找出问题所在,但我做不到,而且现在变得很烦人。

I have Elementary OS on my laptop, but I've tried with Debian as well. 我的笔记本电脑上装有Elementary OS ,但我也尝试过使用Debian

Here is my main.py: 这是我的main.py:

__version__ = “1.0”
from kivy.app import App
from kivy.uix.button import Button

class Hello(App):
    def build(self):
        btn = Button(text='Hello World')
        return  btn

Hello().run()

Here's the logcat log when running the app: 这是运行应用程序时的logcat日志:

02-17 11:08:42.030: E/dalvikvm(6666): dlopen("/data/data/org.testapp.testapp/files/lib/python2.7/lib-dynload/_sqlite3.so") failed: dlopen failed: library "/data/data/org.testapp.testapp/files/lib/python2.7/lib-dynload/_sqlite3.so" not found
02-17 11:08:42.030: E/dalvikvm(6666): dlopen("/data/data/org.testapp.testapp/files/lib/python2.7/lib-dynload/_imaging.so") failed: dlopen failed: library "/data/data/org.testapp.testapp/files/lib/python2.7/lib-dynload/_imaging.so" not found

I've included sqlite3 in requirements (though I don't think it should be necessary in a simple app like above), but the message is the same. 我已经将sqlite3包含在需求中(尽管我认为在像上面这样的简单应用中它不是必需的),但是消息是相同的。

I've tried it on several Android devices , but all of them throws this error. 我已经在几种Android devices上尝试过,但是所有这些Android devices都会引发此错误。

Thanks for any help! 谢谢你的帮助!

EDIT: Here's my buildozer.spec: 编辑:这是我的buildozer.spec:

[app]
title = TestApp
package.name = testapp
package.domain = org.testapp
source.dir = .
source.include_exts = py,kv
version = 0.1
# buildozer init only put kivy, I've added sqlite3 later, to see if it solves the problem, but the issue is the same
requirements = sqlite3,kivy
orientation = landscape
fullscreen = 1
android.api = 19
android.sdk = 19
android.sdk_path = /home/zslevi/Android/Sdk/
[buildozer]
log_level = 1
warn_on_root = 1

EDIT #2: 编辑#2:

Here's the full log: Full log 这是完整的日志: 完整的日志

EDIT #3: 编辑#3:

I've seen an INFO notice that it can't find main.py/main.pyo, but here's my folder: screen 我已经看到一个INFO通知,它找不到main.py/main.pyo,但这是我的文件夹: 屏幕

An old issue, but still relevant since I just installed a fresh qemu install of ubuntu 16, the latest kivy and got this issue running Hello World (using android V4.4) 一个老问题,但仍然有意义,因为我刚刚安装了全新的ubuntu 16 qemu安装程序(最新版本),并在运行Hello World时出现了此问题(使用android V4.4)

My problem was simply that I had named my python app "hello_world.py" instead of "main.py". 我的问题很简单,就是我将自己的python应用命名为“ hello_world.py”,而不是“ main.py”。

Renaming it to "main.py" and recompiling made it work for me. 将其重命名为“ main.py”并重新编译使其对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM