我正在开发一个使用插件的 cordova 应用程序。
其中一个使用 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 获取时都要重新下载它们。
谢谢
最佳答案
您应该能够在 logcat 上使用 native 日志(Log.v、System.out)
您可以通过插件在 webview 控制台上打印
webView.loadUrl("javascript:console.log('hello');");
关于java - 如何使用 "android.util.log"调试 cordova 插件和日志记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27535145/