![](/img/trans.png)
[英]Android: java.util.logging.Logger vs android.util.Log
[英]How to debug cordova plugin and Logging with “android.util.log”
我正在开发一个使用插件的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启动run命令,因为它没有考虑root config.xml文件,导致重写我的设置以及(不知道原因),由于未检测到的插件(已安装peraphs)并且每次从git获取时重新下载它们,因此该过程需要花费太多时间才能运行。
谢谢
您应该能够在logcat上查看本机日志(Log.v,System.out)
您可以在webview控制台上打印,从插件中执行此操作
webView.loadUrl("javascript:console.log('hello');");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.