【问题标题】:How to debug cordova plugin and Logging with "android.util.log"如何使用“android.util.log”调试 cordova 插件和日志记录
【发布时间】:2014-12-17 21:27:13
【问题描述】:

我正在开发一个使用插件的科尔多瓦应用程序。

其中一个使用来自 android.util.log 的方法 Log.v。

问题:

1) where does the plugin flush this logs? And how I can check them?

2) it's possibile to print something to console at runtime from the "java side"?  

I can only debug the javascript part through "crome://inspect" on Google Chrome
or 
via adb running the command "adb logcat CordovaApp:D *:S"

重要提示: 我正在使用 netbeans 7.4,我无法从 netbeans 启动运行命令,因为它没有考虑根 config.xml 文件,导致我的设置被重写,而且(不知道为什么),这个过程需要由于未检测到的插件(安装了 peraphs)而导致运行时间过多,并且每次从 git 获取时都重新下载它们。

谢谢

【问题讨论】:

    标签: java android cordova logging plugins


    【解决方案1】:

    您应该能够在 logcat 上设置本机日志(Log.v、System.out)

    您可以通过插件在 webview 控制台上打印

    webView.loadUrl("javascript:console.log('hello');");
    

    【讨论】:

    • 谢谢 :) 这个简单的指令没有价格 webView.loadUrl("javascript:console.log('hello');");
    • 朋友请,另一个信息:你知道 parse.com 并且你有管理 parse.com 插件吗?如果我打开另一个问题,你能帮我吗?
    • 对不起,我没用过解析
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-23
    • 1970-01-01
    • 1970-01-01
    • 2020-09-12
    • 2015-05-02
    • 1970-01-01
    相关资源
    最近更新 更多