在android上运行时,应用立即崩溃

时间:2020-01-14 18:59:14

标签: python android kivy buildozer

我尝试使用buildozer从python / kivy程序制作apk。它可以在Mac上很好地运行,但是当我为Android智能手机创建apk文件时,它立即崩溃,没有任何消息。

要找到该错误,我尝试使用一个简单的“ hello world”程序执行相同的操作。这也立即崩溃。在另一部手机上,我得到了相同的结果。

这是我的buildozer日志文件的一部分。

> WARNING: Received a --sdk argument, but this argument is deprecated
> and does nothing. No compiled python is present to zip, skipping. No
> setup.py/pyproject.toml used, copying full private data into .apk.
> Applying Java source code patches... Applying patch:
> src/patches/SDLActivity.java.patch Warning: failed to apply patch
> (exit code 1), assuming it is already applied:
> src/patches/SDLActivity.java.patch
> # Android packaging done!
> # APK myapp__armeabi-v7a-1.0-armeabi-v7a-debug.apk available in the bin directory
> # Run '/Users/jeffreyschuster/.buildozer/android/platform/android-sdk/platform-tools/adb
> devices'
> # Cwd None List of devices attached
> 
> # Application pushed.
> # Application started.
> # Search for Git (git)
> #  -> found at /usr/bin/git
> # Search for Cython (cython)
> #  -> found at /Library/Frameworks/Python.framework/Versions/3.7/bin/cython
> # Search for Java compiler (javac)
> #  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac
> # Search for Java keytool (keytool)
> #  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/keytool

程序本身如下(来自互联网的简单示例)

#!/usr/bin/env python 
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label

class Lesson1App(App):
    def build(self):
        lbl=Label(text='Hello World!') 
        return lbl

if __name__ == '__main__':    
    Lesson1App().run()

任何崩溃的主意吗?

连接手机并将命令与deploy等配合使用后,它仍然以相同的方式结束。这是新的日志文件:

https://drive.google.com/open?id=1YQssyT-5vMhb44d8JRMj3nRIycRFhdpf

我希望此链接正常工作

好的,我发现我必须在手机上进行一些设置。现在安装似乎可以正常工作,但应用仍然崩溃。

在电话上,我收到与手动安装时相同的错误消息:

screenshot

0 个答案:

没有答案