简体   繁体   English

Dartium找不到内置库

[英]Dartium cannot find built in library

I am trying to write an application that uses the RPC api. 我正在尝试编写一个使用RPC API的应用程序。

My application works okay when run as javascript in chrome, but when I try and run it in Dartium, I get the following message 当我在chrome中以javascript运行时,我的应用程序可以正常运行,但是当我尝试在Dartium中运行它时,出现以下消息

The requested built-in library is not available on Dartium.'package:rpc/src/context.dart': error: line 7 pos 1: library handler failed import 'dart:io'; 所需的内置库在Dartium上不可用。'package:rpc / src / context.dart':错误:第7行pos 1:库处理程序导入'dart:io'失败; ^: package:rpc/src/context.dart ^:包:rpc / src / context.dart

I don't think that my client code is importing dart:io. 我不认为我的客户代码正在导入dart:io。 Is there any way of checking this? 有什么办法可以检查吗?

You can't use the RPC package code directly in your client application. 您不能直接在客户端应用程序中使用RPC软件包代码。 RPC is server-side only. RPC仅在服务器端。 You can then generate the client code from your RPC server application. 然后,您可以从RPC服务器应用程序生成客户端代码。 The README.md of the RPC package has more details how to do this. RPC程序包的README.md包含如何执行此操作的更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM