无法获取远程的WebView调试在Android 4.4 Trigger.io应用运行 [英] Cannot get remote WebView debugging to run on Android 4.4 Trigger.io app

查看:155
本文介绍了无法获取远程的WebView调试在Android 4.4 Trigger.io应用运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让远程调试网页视图 Trigger.io 在Nexus 7(Android的4.4.3)上运行的应用程序。我创建了一个机模块与以下设置web视图属性方法:

I'm trying to enable remote debugging for WebViews on a Trigger.io app running on Nexus 7 (Android 4.4.3). I've created a native module to set the Webview property with the following method:

public static void enableWebViewDebugging(final ForgeTask task) {
    if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
        WebView.setWebContentsDebuggingEnabled(true);
    }
    task.success();
}

我用 forge.internal.call('utils.enableWebViewDebugging',{},NULL,NULL)调用它从JS; 应用程序几秒钟后开始。

I call it from JS with forge.internal.call('utils.enableWebViewDebugging', {}, null, null); a few seconds after the app started.

当在铬looging://检查/#设备设置页,我只看到Chrome浏览器选项卡,但没有原生的WebView /任何应用程序

When looging at the chrome://inspect/#devices tab, I only see Chrome browser tabs, but no native WebView/app whatsoever.

这有什么错我设置属性的方式吗?我能想象,那的WebView属性必须一个特定的启动/ onCreate方法中进行设置,不过是,即使可能的Trigger.io?

Is there anything wrong with the way I set the property? I could imagine, that the WebView property must be set during a specific startup/oncreate method, however is that even possible with Trigger.io?

推荐答案

Trigger.io本身支持Android的远程调试> 4.4,所以你不应该需要创建自己的自定义模块。

Trigger.io natively supports remote debugging for Android > 4.4 so you shouldn't need to create your own custom module.

要启用它,你可以去触发工具包您的应用程序的配置并启用的复选框:核心=>的Andr​​oid =>远程调试

To enable it you can go to your app config in Trigger Toolkit and enable the checkbox at: Core => Android => Remote Debugging

此外,直接编辑你的src / config.json文件并添加remote_debugging关键core.android部分:

Alternatively, edit your src/config.json file directly and add the 'remote_debugging' key to the core.android section:

"core": {
                "android": {
                        "remote_debugging": true,
                }
},

这篇关于无法获取远程的WebView调试在Android 4.4 Trigger.io应用运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆