angular - Nativescript angular WebView - “无法为 devtools 启动 http 服务器”
问题描述
我正在尝试让 WebView 为我们的 Angular Nativescript 应用程序工作。不幸的是,尝试在连接到 Internet ( ) 的模拟器中加载 webview 时出现以下错误,出现空白屏幕tns run android --bundle
:
JS: WebView<plaid-webview>
chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
02-26 14:52:07.826 12754 12754 I cr_BrowserStartup: Initializing chromium process, singleProcess=false
chromium: [ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
这是组件html:
<StackLayout>
<WebView #plaidWebview id="plaid-webview" [src]="plaidWebviewSrc">
</WebView>
</StackLayout>
在组件 ts (component.tns.ts) 中,我设置了 src:
@Component({
selector: 'plaid-webview',
templateUrl: './plaid-webview.component.html',
styleUrls: ['./plaid-webview.component.scss']
})
export class PlaidWebViewComponent implements OnInit {
public plaidWebViewSrc : string = "https://docs.nativescript.org/";
...
这与此处的文档相匹配
解决方案
我不确定我之前做错了什么,但 webview 现在正在正确加载 url。我仍然收到 devtools 错误,但我并不过分担心它。如果有人对此有解决方案,请随时发布,我会标记为解决方案。
推荐阅读
- python - 当我运行“import dash”时,代码会生成图表
- makefile - make 继续运行规则
- javascript - 是否有内置解决方案可以对 64 位类型化数组操作数进行所有按位运算?
- python - 如何在单个 Conda 环境中安装两个版本的 Python?
- elasticsearch - 如何将存储的无痛脚本ID发送到spring data elasticsearch更新查询?
- javascript - 从数据库中获取数据并显示
- flutter - Flutter 中的自定义渲染 | 着色器
- javascript - 循环遍历一系列链接并在 JavaScript 中切换它们的类
- entity-framework - Entity Framework 6 异步并行查询是否使用多个活动结果集进行连接池
- elixir - 当您已经在 iex 中时如何启动 Phoenix 服务器?