如何在 ARC Welder 下调试 Kivy 应用程序

How to debug a Kivy application under ARC Welder

为了在 Windows 下调试我的 Python Kivy 应用程序,我下载了 ARC Welder 工具并将其安装在 Chrome 浏览器下的 Windows 下。安装工作正常,加载我的 .apk 文件也很好,该文件是使用 Buildozer 工具在 Boot2Docker、Docker、Ubuntu 下构建的。 Chrome 应用程序显示 Kivy 徽标,然后告诉 "loading" 后跟一个“:-(”图标。

我如何启动日志文件来显示导致 Kivy 应用程序崩溃的 运行 时间错误?

在 Chrome 控制台显示的消息下方:

plugin not ready$
jscomp.scope.Plugin.postMessage @ plugin.js:336$
jscomp.scope.Plugin.onWindowStateChanged_ @ plugin.js:1579target.(anonymous function) @ 
extensions::SafeBuiltins:19EventImpl.dispatchToListener @ extensions::event_bindings:388target.(anonymous function) @ 
extensions::SafeBuiltins:19publicClassPrototype.(anonymous function) @ 
extensions::utils:151EventImpl.dispatch_ @ extensions::event_bindings:372EventImpl.dispatch @ 
extensions::event_bindings:394target.(anonymous function) @ 
extensions::SafeBuiltins:19publicClassPrototype.(anonymous function) @ 
extensions::utils:151dispatchEventIfExists @ extensions::app.window:335updateAppWindowProperties @ 
extensions::app.window:356

后台检查:

Delaying update install logic for 107 seconds
filesystem_background.js:253 ARC HTML5 FS: Request FileSystem: 35ms
main.js:354 ARC Window Popup: 97.5ms
main.js:388 ARC appWindow Init: 0.35ms
crash_reporter.js:298 prod: ARC
crash_reporter.js:298 arc_app_name: CFEduPlayer
crash_reporter.js:298 ptime: NaN
crash_reporter.js:298 crash_time: Wed Nov 02 2016 13:54:07 GMT-0200 (Horário brasileiro de verão)
crash_reporter.js:298 ver: 54.5021.629.0
crash_reporter.js:298 arc_build_tag: arc-runtime-54.5021.629.0
crash_reporter.js:298 message: plugin crash without minidump
crash_reporter.js:298 chrome_version: 54.0.2840.87
crash_reporter.js:298 app_id: cnlfghclafgbigiolhlbghjnenbaippl
crash_reporter.js:298 app_version: 0.1
crash_reporter.js:298 app_package_name: org.test.cfeduplay
crash_reporter.js:298 runtime_name: App Runtime for Chrome (Beta)
crash_reporter.js:298 runtime_update_url: https://clients2.google.com/service/update2/crx
crash_reporter.js:298 arch: x86-32
crash_reporter.js:298 nacl_arch: x86-64
crash_reporter.js:298 os: win
crash_reporter.js:298 target_arch: nacl_x86_64
crash_reporter.js:298 width: 960
crash_reporter.js:298 height: 632
crash_reporter.js:298 is_minimized: false
crash_reporter.js:298 is_maximized: false
crash_reporter.js:298 is_fullscreen: false
crash_reporter.js:298 runtime_updated_while_running: null
crash_reporter.js:298 sig: exit() called
crash_reporter.js:161 Crash reporting not enabled in Chrome.  Please enable it.
crash_reporter.js:318 FINISHED REPORTING CRASH

应用程序检查:

ARC JS Init: 222ms
plugin.js:654 Compositor is enabled
filesystem.js:97 File system is initialized.
plugin.js:336 Plugin not ready$jscomp.scope.Plugin.postMessage @ plugin.js:336
filesystem.js:227 ARC HTML5 FS: prefetchExtraFileMetadata_: 1.32e+03ms
plugin.js:800 3.661s + 0.078s = 3.740s (+0.0M virt, +0.0M res): App instance started

plugin.js:784 ARC Plugin Load: 3.45e+03ms
filesystem.js:286 Sending 147 file system cache entries to the plugin
plugin.js:800 3.661s + 0.080s = 3.742s (+0.0M virt, +0.0M res): Started renderer thread

plugin.js:800 3.661s + 1.634s = 5.296s (+0.0M virt, +0.0M res): Starting System

plugin.js:800 3.661s + 3.393s = 7.055s (+0.0M virt, +0.0M res): Android runtime initialized

plugin.js:800 3.661s + 3.453s = 7.115s (+0.0M virt, +0.0M res): Started SurfaceFlinger

plugin.js:800 3.661s + 3.668s = 7.330s (+0.0M virt, +0.0M res): Started native services

plugin.js:800 3.661s + 5.141s = 8.802s (+0.0M virt, +0.0M res): Package dexopted

plugin.js:800 3.661s + 6.548s = 10.209s (+0.0M virt, +0.0M res): System server started

gen_index.min.html:1 Is the 'geolocation' permission appropriate? See http://developer.chrome.com/apps/declare_permissions.html.
plugin.js:800 3.661s + 6.736s = 10.397s (+0.0M virt, +0.0M res): Activity onResume {org.test.cfeduplay/org.renpy.android.PythonActivity} (build 54.5021.629.0)

plugin.js:800 3.661s + 8.528s = 12.189s (+0.0M virt, +0.0M res): Exiting

gen_index.min.html:1 NativeClient: NaCl module crashed
plugin.js:978 plugin crashed$jscomp.scope.Plugin.showCrash_ @ plugin.js:978

问候,

欢迎提供有关 ARC Welder 上 Kivy 调试程序的指导。

在最后一个带有“:-(”图标的错误屏幕上,右键单击鼠标并选择 select "inspect" 或 "inspect background"。我已经找出了问题的根本原因错误,这是将 ffmpeg 模块和编解码器添加到 buildozer 环境的必备条件。我在 Ubuntu 14 系统映像中安装了 ffmpeg 包,并使用以下命令将其添加到 buildozer.spec 要求中声明:requirements = kivy,ffmpeg。这解决了问题,.apk 开始播放媒体,在 ARC Welder 浏览器平台下,以及在 Android 下 6. 对解决方案感到满意,ARC Welder 正在运行完美!