简体   繁体   中英

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.

When I run the app in Dartium, an error is thrown '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. 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. If google_oauth2_client uses it, which I doubt the library were not intended for client usage. Have you tried pub upgrade ?

google_oauth2_client has both a browser library and a console library. The console library makes use of dart:io while the browser one does not. Make sure that you are using the browser version. You can see an example of how to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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