Prob with buildozer apk和自定义python包

时间:2016-02-07 17:39:07

标签: android python package kivy buildozer

是否有人可以使用buildozer编译在Android上运行此代码:

(对我来说,它编译,但在android上崩溃)

... / main.py

__version__ = '0.1'

from code.app import MyApp

if __name__ == '__main__' :

    MyApp().run()

... /代码/ __初始化__。PY

nothing

... /代码/ app.py

来自kivy.app import App 来自kivy.uix.label导入标签

class MyApp(App):

    def build(self):
        return Label(text='Hello !')

... / buildozer.spec

[app]

title = Test
package.name = myTest
package.domain = org.test
source.dir = .
source.include_exts = py
version.regex = __version__ = ['"](.*)['"]
version.filename = %(source.dir)s/main.py
requirements = kivy
orientation = portrait
fullscreen = 1

[buildozer]
log_level = 1
warn_on_root = 1

adb logcat :(摘录)

D / OpenGLRenderer(9422):启用调试模式0
V / WindowManager(857):添加窗口窗口{2584f44 u0 SurfaceView},共11个(在Window {fdf5dd6 u0 org.test.myloging / org.renpy.android.PythonActivity}之前) I / SDLSurface(9422):选择egl配置
I / SDLSurface(9422):尝试使用图形配置R8G8B8A8S8
W / SDLSurface(9422):创建egl表面
I / python(9422):presplash-fit为null
I / ActivityManager(857):显示org.test.myloging / org.renpy.android.PythonActivity:+ 218ms
I / python(9422):presplash(fit = null)mx = 0,703125,my = 1,156250
I / libSDL(9422):物理屏幕分辨率为720x1184
I / python(9422):为Android初始化Python
W / InputMethodManager(9422):忽略onBind:cur seq = 1016,给定seq = 1015
I / Timeline(9422):时间轴:Activity_idle id:android.os.BinderProxy@22de304a时间:52888036
I / python(9422):[' /data/data/org.test.myloging/files/lib/python2.7/site-packages' ;,' /data/data/org.test .myloging /文件/ lib目录/网站的Python']
I / python(9422):Android路径[' /data/data/org.test.myloging/files/lib/python27.zip' ;,' /data/data/org.test.myloging /files/lib/python2.7' ;,' /data/data/org.test.myloging/files/lib/python2.7/lib-dynload' ;,' / data / data /org.test.myloging/files/lib/python2.7/site-packages' ;,' /data/data/org.test.myloging/files' ;,' / data / data /org.test.myloging/files/_applibs']
I / python(9422):Android kivy bootstrap完成。 __name__是__main__
I / python(9422):运行用户程序,更改目录并执行main.py
I / python(9422):Traceback(最近一次调用最后一次):
I / python(9422):文件" /home/romuald/Kivy/Login/.buildozer/android/app/main.py" ;,第4行,中
I / python(9422):ImportError:没有名为app的模块 I / python(9422):用于android的Python结束了 I / art(9422):System.exit调用,状态:0
I / AndroidRuntime(9422):VM退出,结果代码为0,跳过清理。
I / WindowState(857):WIN DEATH:Window {fdf5dd6 u0 org.test.myloging / org.renpy.android.PythonActivity}
I / WindowState(857):胜利死亡:窗口{2584f44 u0 SurfaceView}
I / ActivityManager(857):进程org.test.myloging:python(pid 9422)已经死亡了 W / ActivityManager(857):强制删除ActivityRecord {250b9f13 u0 org.test.myloging / org.renpy.android.PythonActivity t170}:app死了,没有保存状态

0 个答案:

没有答案