dint-dev / universal_html

Cross-platform 'dart:html'.
https://pub.dev/packages/universal_html
Apache License 2.0
201 stars 61 forks source link

Android and Integration Tests are unable to compile #8

Closed MTRNord closed 4 years ago

MTRNord commented 4 years ago

Hi I use the js module. Web compiles fine without any errors but when it comes to Android and Integration tests (iOS) I get the following compiler error:

Using device iPhone 8.
236 Starting application: test_driver/app.dart
237 Compiler message:
238 ../../../../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/universal_html-1.1.8/lib/src/js.dart:184:7: Error: Class 'JsObject with ListMixin<E>' inherits multiple members named '[]' with incompatible signatures.
239 Try adding a declaration of '[]' to 'JsObject with ListMixin<E>'.
240 class JsArray<E> extends JsObject with ListMixin<E> {
241       ^
242 ../../../../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/universal_html-1.1.8/lib/src/js.dart:101:20: Context: This is the inherited member.
243   dynamic operator [](property) {
244                    ^^
245 org-dartlang-sdk:///third_party/dart/sdk/lib/core/list.dart:278:14: Context: This is the inherited member.
246   E operator [](int index);
247              ^^
248 ../../../../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/universal_html-1.1.8/lib/src/js.dart:184:7: Error: The superclass, 'JsObject', has no unnamed constructor that takes no arguments.
249 class JsArray<E> extends JsObject with ListMixin<E> {
250       ^
251 Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
252 Failed to build bundle.

The imports used are:

import "package:universal_html/prefer_universal/js.dart";

and

import "package:universal_html/prefer_universal/html.dart"
    as html; 
MTRNord commented 4 years ago

Feel free to ask for more information

terrier989 commented 4 years ago

Hi, can you try with version 1.1.9? I would expect it to fix the issue that you have.

MTRNord commented 4 years ago

@terrier989 thanks a lot for the quick fix :) Our CI shows "all green" again! :D