问题描述
由于Chrome浏览器进行远程调试一个真棒功能,我想知道这到底是怎么在工作灯发展的帮助。
在他们说你的WebView内容调试下面的文档,你需要通过调用setWebContentsDebuggingEnabled,在web视图类的静态方法,使其能够编程方式从您的应用程序中。
我在哪里可以找到这个类,并会在有利于做到在工作灯?
<一个href="https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl#debugging-webviews" rel="nofollow">https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl#debugging-webviews
请注意的WebView调试只与Android 4.4系统的奇巧而不是Android操作系统的任何早期版本。
要在一个工作灯的应用程序的Android环境中调试铬的WebView,
-
打开Android SDK和更新的API级别19
- 您当然会需要或者设备或模拟器上运行该版本。
- 您当然会需要或者设备或模拟器上运行该版本。
-
确认,在
yourAppName \机器人\本地\ AndroidManifest.xml中
添加了targetSdkVersion = 19 $ C $支持C>。
-
更改构建目标为
Android 4.4系统
:- 右键单击生成的Android项目>属性>安卓>构建目标
- 右键单击生成的Android项目>属性>安卓>构建目标
-
打开
yourAppName \机器人\本地的\ src \ COM \ yourAppName \ yourAppName.java
和- 导入以下内容:
- 添加以下到
的onCreate()
功能:
的步骤的其余部分是如在Google文档页面。
我没有Android设备,以验证这一点,所以请尽量。
至于是否有益与否,另一调试备选不能伤害。它是由你来决定,如果它是好还是不好,对你。
Since Chrome has an awesome feature for remote debugging,I am wondering how this could help in developing in Worklight.
In the following docs they say to debug the contents of your WebView, you need to enable it programmatically from within your application by calling setWebContentsDebuggingEnabled, a static method on the WebView class.
Where can I find this class and will this be beneficial to do it in Worklight?
https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl#debugging-webviews
Please note that WebView debugging is only relevant for Android 4.4 "KitKat" and not to any prior version of the Android OS.
To debug your Chromium WebView in a Worklight application with the Android environment,
Open the Android SDK and update to API Level 19.
- You will of course need either a device or emulator running this version.
- You will of course need either a device or emulator running this version.
Make sure that in
yourAppName\android\native\AndroidManifest.xml
you add support fortargetSdkVersion=19
.Change the Build Target to
Android 4.4
:- Right-click on the generated Android project > Properties > Android > Build Target
- Right-click on the generated Android project > Properties > Android > Build Target
Open
yourAppName\android\native\src\com\yourAppName\yourAppName.java
and- Import the following:
- Add the following to the
onCreate()
function:
The rest of the steps are as described in the Google documentation page.
I don't have an Android device to verify this, so please try.
As for whether it is beneficial or not, another debugging alternative can't hurt. It is up to you to decide if it's good or not, for you.
这篇关于IBM工作灯 - 我怎么能在Android中的WebView调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!