Why does the first step in the "Get Started With Web UI" tutorial cause an error and what does the error mean?


I’m going through the “targets” (tutorials) at dartlang.org. I’m at Target 6: Get Started with Web UI and have run into an error at step #1 under the section “Set up background compilation in Dart Editor”.

Could someone explain why this error is happening, or what I could do to resolve it? The error is below.

Error setting breakpoint at 'main': 'package:logging/logging.dart': 
Error: line 250 pos 24: wrong number of type arguments in type 'Comparable'
class Level implements Comparable<Level> {

I have not changed anything in any logging package, nor messed with any Comparable class. What gives?


This is probably related to incompatibilities between the version of the SDK you are running and the version of web_ui. If you have the most recent version of both, they work together. If you don’t want to use the most recent versions, then you have to explicitly manage the versions in your pubspec.yaml file.

I’m using Dart Editor version: 0.4.0_r18915 and web_ui version: 0.4.0
and it works fine.

Try getting the most recent version of Dart Editor, remove the pubspec.lock file, and run pub install again.

Meanwhile, I will figure out how to strengthen the language in the tutorial about managing versions.

Hope this helps.

Answered By – mem

Answer Checked By – Terry (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *