Kivy QPython app on Android Moto G phone - no log output

邮差的信 提交于 2019-12-11 13:58:14

问题


I'm having some trouble with my Kivy apps when run from the QPython launcher.

If I run the standard pong example, I don't see any output.

This used to work. So, I suspect that QPython, or Kivy has taken an 'upgrade' which has broken something.

In the past I would be able to swipe down to see the log output icon. But, now that's no longer there. Well done QPython, Kivy !!!!

So, what's changed? And, how am I supposed to check program log output to see why it no longer runs?

Regards

Nick


回答1:


As I replied to Zaphod's post on the missing log before my answer was removed: I've made an issue on qpython's github about that problem and the dev have answered. The "no log information" is a bug and he should remove it in the next update. As a temporary fix, I reroute my stdout and stderr to .run.log:

import sys
f=open('.run.log','w') 
f.close()
sys.stdout=open('.run.log','a') 
sys.stderr=open('.run.log','a')

Laurent




回答2:


I don't know about qpython's log stuff, but you can see the kivy log output by viewing the logcat stream, e.g. from an attached computer (with developer mode enabled) using adb logcat.

This has always been possible and is the standard way to view the log output with kivy (and with android in general). It sounds like your direct problem relates to a change in qpython.



来源:https://stackoverflow.com/questions/31852534/kivy-qpython-app-on-android-moto-g-phone-no-log-output

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!