简体   繁体   English

最新稳定版(v1.1.1) - Dartium上没有内置库'dart:io'

[英]Latest stable release (v1.1.1) - The built-in library 'dart:io' is not available on Dartium

My application was working mint until I just updated to the latest version of the Dart SDK and Editor. 我的应用程序工作正常,直到我刚刚更新到最新版本的Dart SDK和编辑器。

When I run the app in Dartium, an error is thrown 'The built-in library 'dart:io' is not available on Dartium' . 当我在Dartium中运行应用程序时,会抛出错误'The built-in library 'dart:io' is not available on Dartium' I am not using dart:io directly but imported lib packages like google_oauth2_client use it. 我没有直接使用dart:io,但导入的lib软件包如google_oauth2_client使用它。 This was all working fine until just an hour or two ago. 直到一两个星期前,这一切都很好。

I am sort of stuck until this is resolved. 在解决这个问题之前,我有点困惑。 Is anyone having the same issue? 有人有同样的问题吗?

dart:io isn't compatible with the browser, it's standalone-VM only. dart:io与浏览器不兼容,它只是独立的VM。 If google_oauth2_client uses it, which I doubt the library were not intended for client usage. 如果google_oauth2_client使用它,我怀疑该库不适合客户端使用。 Have you tried pub upgrade ? 你试过pub upgrade吗?

google_oauth2_client has both a browser library and a console library. google_oauth2_client同时具有浏览器库和控制台库。 The console library makes use of dart:io while the browser one does not. 控制台库使用dart:io,而浏览器库则不使用。 Make sure that you are using the browser version. 确保您使用的是浏览器版本。 You can see an example of how to do this. 您可以看到如何执行此操作的示例

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

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