I am unable to build flutter application using the following environment
environment:
sdk: '>=2.18.5 <3.0.0'
I am getting below error
Error output from Xcode build:
error: the following command failed with exit code 0 but produced no further output
error: the following command failed with exit code 0 but produced no further output
: Error: Type 'EditableTextContextMenuBuilder' not found.
text_field.dart:558
: Error: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null.
search_field.dart:244
: Error: Undefined name 'CupertinoAdaptiveTextSelectionToolbar'.
text_field.dart:442
: Error: 'EditableTextContextMenuBuilder' isn't a type.
text_field.dart:558
: Error: 'EditableTextContextMenuBuilder' isn't a type.
text_field.dart:870
: Error: No named parameter with the name 'contextMenuBuilder'.
text_field.dart:1395
: Error: A value of type 'OverlayState?' can't be assigned to a variable of type 'OverlayState' because 'OverlayState?' is nullable and 'OverlayState' isn't.
tooltip.dart:170
: Error: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null.
i get this error
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
../../../development/sdks/flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.4.0/lib/src/widgets/editor.dart:1321:7: Error: Type 'TextInputControl' not found.
TextInputControl? oldControl, TextInputControl? newControl) {
^^^^^^^^^^^^^^^^
../../../development/sdks/flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.4.0/lib/src/widgets/editor.dart:1321:37: Error: Type 'TextInputControl' not found.
TextInputControl? oldControl, TextInputControl? newControl) {
^^^^^^^^^^^^^^^^
../../../development/sdks/flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.4.0/lib/src/widgets/editor.dart:1321:7: Error: 'TextInputControl' isn't a type.
TextInputControl? oldControl, TextInputControl? newControl) {
^^^^^^^^^^^^^^^^
../../../development/sdks/flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.4.0/lib/src/widgets/editor.dart:1321:37: Error: 'TextInputControl' isn't a type.
TextInputControl? oldControl, TextInputControl? newControl) {
^^^^^^^^^^^^^^^^
and this happens after remove the zefrka package and reuse it
what is problem?
so when I run my flutter project on the web, it works normally but when I run it on android studio it gives me a very long error.
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Invalid depfile: C:\Users\Test\AndroidStudioProjects\ttpflutter\.dart_tool\flutter_build\e3430e350d00f0518ffe1d1be27ae083\kernel_snapshot.d
Invalid depfile: C:\Users\Test\AndroidStudioProjects\ttpflutter\.dart_tool\flutter_build\e3430e350d00f0518ffe1d1be27ae083\kernel_snapshot.d
../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.20.1/lib/src/audioplayers_web.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:13:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:5:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.20.1/lib/src/audioplayers_web.dart:20:3: Error: Type 'AudioElement' not found.
AudioElement? player;
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:79:48: Error: Type 'html.EventListener' not found.
external ui.VoidCallback addPopStateListener(html.EventListener fn);
^^^^^^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:194:3: Error: Type 'html.Location' not found.
html.Location get _location => html.window.location;
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:196:3: Error: Type 'html.History' not found.
html.History get _history => html.window.history;
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:199:28: Error: Type 'html.EventListener' not found.
void addPopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:204:31: Error: Type 'html.EventListener' not found.
void removePopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:7: Error: Type 'AnchorElement' not found.
final AnchorElement _urlParsingNode = AnchorElement();
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:7: Error: Type 'Element' not found.
final Element? _baseElement = document.querySelector('base');
^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.20.1/lib/src/audioplayers_web.dart:20:3: Error: 'AudioElement' isn't a type.
AudioElement? player;
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.20.1/lib/src/audioplayers_web.dart:49:14: Error: The method 'AudioElement' isn't defined for the class 'WrappedPlayer'.
- 'WrappedPlayer' is from 'package:audioplayers/src/audioplayers_web.dart' ('../../Documents/flutter_windows_2.2.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.20.1/lib/src/audioplayers_web.dart').
Try correcting the name to the name of an existing method, or defining a method named 'AudioElement'.
player = AudioElement(currentUrl);
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:87:15: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'.
return ui.webOnlyInstantiateImageCodecFromUrl(// ignore: undefined_function, avoid_dynamic_calls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:48:14: Error: Method not found: 'allowInterop'.
getPath: allowInterop(strategy.getPath),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:49:15: Error: Method not found: 'allowInterop'.
getState: allowInterop(strategy.getState),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:50:26: Error: Method not found: 'allowInterop'.
addPopStateListener: allowInterop(strategy.addPopStateListener),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:51:25: Error: Method not found: 'allowInterop'.
prepareExternalUrl: allowInterop(strategy.prepareExternalUrl),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:52:16: Error: Method not found: 'allowInterop'.
pushState: allowInterop(strategy.pushState),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:53:19: Error: Method not found: 'allowInterop'.
replaceState: allowInterop(strategy.replaceState),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:54:9: Error: Method not found: 'allowInterop'.
go: allowInterop(strategy.go),
^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:79:53: Error: 'EventListener' isn't a type.
external ui.VoidCallback addPopStateListener(html.EventListener fn);
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:194:39: Error: Undefined name 'window'.
html.Location get _location => html.window.location;
^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:196:37: Error: Undefined name 'window'.
html.History get _history => html.window.history;
^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:199:33: Error: 'EventListener' isn't a type.
void addPopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:200:10: Error: Undefined name 'window'.
html.window.addEventListener('popstate', fn);
^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:204:36: Error: 'EventListener' isn't a type.
void removePopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:205:10: Error: Undefined name 'window'.
html.window.removeEventListener('popstate', fn);
^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:7: Error: 'AnchorElement' isn't a type.
final AnchorElement _urlParsingNode = AnchorElement();
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:39: Error: Method not found: 'AnchorElement'.
final AnchorElement _urlParsingNode = AnchorElement();
^^^^^^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:7: Error: 'Element' isn't a type.
final Element? _baseElement = document.querySelector('base');
^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:31: Error: Undefined name 'document'.
final Element? _baseElement = document.querySelector('base');
^^^^^^^^
../../Documents/flutter_windows_2.2.3-stable/flutter/packages/flutter_web_plugins/lib/src/plugin_registry.dart:66:8: Error: Method not found: 'webOnlySetPluginHandler'.
ui.webOnlySetPluginHandler(handleFrameworkMessage);
^^^^^^^^^^^^^^^^^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1 asFileUri (package:vm/kernel_front_end.dart:623:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:763:21)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:586:9)
<asynchronous suspension>
#4 starter (package:flutter_frontend_server/server.dart:85:12)
<asynchronous suspension>
#5 main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
<asynchronous suspension>
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\Test\Documents\flutter_windows_2.2.3-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\Test\Documents\flutter_windows_2.2.3-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
Exception: Gradle task assembleDebug failed with exit code 1
I can't delete dart.html or dart.js and I can't make a whole project all over again since I only have 1 week to finish the project.
Is there any way that I could run it both on android and web without all of this error
Edit: I tried updating android Gradle but it still didn't work
I'm using time zone in my project and I was trying to download the database using this command flutter pub run tool/get -s 2021d. I've redirected from external libraries and run this command from C:\flutter\.pub-cache\hosted\pub.dartlang.org\timezone-0.8.0>.
but when I run Failed to precompile timezone:get: Error: Error when reading '../../../global_packages/timezone/.dart_tool/package_config.json': The system cannot find the path specified. is thrown.
full error
C:\flutter\.pub-cache\hosted\pub.dartlang.org\timezone-0.8.0>flutter pub run tool/get -s 2021d
Failed to precompile timezone:get:
Error: Error when reading '../../../global_packages/timezone/.dart_tool/package_config.json': The system cannot find the path specified.
Error: Couldn't resolve the package 'args' in 'package:args/args.dart'.
Error: Couldn't resolve the package 'file' in 'package:file/file.dart'.
Error: Couldn't resolve the package 'glob' in 'package:glob/glob.dart'.
Error: Couldn't resolve the package 'glob' in 'package:glob/list_local_fs.dart'.
Error: Couldn't resolve the package 'logging' in 'package:logging/logging.dart'.
Error: Couldn't resolve the package 'path' in 'package:path/path.dart'.
Error: Couldn't resolve the package 'timezone' in 'package:timezone/src/tools.dart'.
Error: Couldn't resolve the package 'timezone' in 'package:timezone/src/tzdb.dart'.
Error: Couldn't resolve the package 'timezone' in 'package:timezone/timezone.dart'.
pub finished with exit code 1
how can I fix this?
more of the thrown error
tool/get.dart:16:8: Error: Not found: 'package:args/args.dart'
import 'package:args/args.dart';
^
tool/get.dart:17:8: Error: Not found: 'package:file/file.dart'
import 'package:file/file.dart' as pkg_file;
^
tool/get.dart:18:8: Error: Not found: 'package:glob/glob.dart'
import 'package:glob/glob.dart';
^
tool/get.dart:19:8: Error: Not found: 'package:glob/list_local_fs.dart'
import 'package:glob/list_local_fs.dart';
^
tool/get.dart:20:8: Error: Not found: 'package:logging/logging.dart'
import 'package:logging/logging.dart';
^
tool/get.dart:21:8: Error: Not found: 'package:path/path.dart'
import 'package:path/path.dart' as p;
^
tool/get.dart:23:8: Error: Not found: 'package:timezone/src/tools.dart'
import 'package:timezone/src/tools.dart';
^
tool/get.dart:24:8: Error: Not found: 'package:timezone/src/tzdb.dart'
import 'package:timezone/src/tzdb.dart';
^
tool/get.dart:25:8: Error: Not found: 'package:timezone/timezone.dart'
import 'package:timezone/timezone.dart';
^
tool/get.dart:26:8: Error: Not found: 'package:timezone/tzdata.dart'
import 'package:timezone/tzdata.dart' as tzfile;
^
tool/get.dart:45:8: Error: Type 'tzfile.Location' not found.
Future<tzfile.Location> loadTzfileLocation(String name, String path) async {
^^^^^^^^^^^^^^^
tool/get.dart:28:17: Error: Method not found: 'join'.
final outPath = p.join('lib', 'data');
^^^^
tool/get.dart:47:17: Error: Getter not found: 'Location'.
return tzfile.Location.fromBytes(name, rawData);
^^^^^^^^
tool/get.dart:52:19: Error: Method not found: 'join'.
final outPath = p.join(dest, 'tzdata$version.tar.gz');
^^^^
tool/get.dart:95:3: Error: Getter not found: 'Logger'.
Logger.root.level = Level.ALL;
^^^^^^
tool/get.dart:95:23: Error: Getter not found: 'Level'.
Logger.root.level = Level.ALL;
^^^^^
tool/get.dart:96:3: Error: Getter not found: 'Logger'.
Logger.root.onRecord.listen((LogRecord rec) {
^^^^^^
tool/get.dart:96:32: Error: 'LogRecord' isn't a type.
Logger.root.onRecord.listen((LogRecord rec) {
^^^^^^^^^
tool/get.dart:99:15: Error: Method not found: 'Logger'.
final log = Logger('main');
^^^^^^
tool/get.dart:102:18: Error: Method not found: 'ArgParser'.
final parser = ArgParser()
^^^^^^^^^
tool/get.dart:113:35: Error: 'Location' isn't a type.
final tzfileLocations = <tzfile.Location>[];
^^^^^^^^
tool/get.dart:127:24: Error: Method not found: 'join'.
final zicDirPath = p.join(tmpDir.path, 'zic');
^^^^
tool/get.dart:133:17: Error: Method not found: 'join'.
await zic(p.join(tmpDir.path, i), zicDirPath);
^^^^
tool/get.dart:137:25: Error: Method not found: 'Glob'.
final files = await Glob('**/*').list(root: zicDirPath).toList();
^^^^
tool/get.dart:139:25: Error: 'File' isn't a type.
if (f is pkg_file.File) {
^^^^
tool/get.dart:140:22: Error: Method not found: 'relative'.
final name = p.relative(f.path, from: zicDirPath);
^^^^^^^^
tool/get.dart:152:14: Error: Method not found: 'LocationDatabase'.
final db = LocationDatabase();
^^^^^^^^^^^^^^^^
tool/get.dart:154:12: Error: Method not found: 'tzfileLocationToNativeLocation'.
db.add(tzfileLocationToNativeLocation(loc));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tool/get.dart:156:18: Error: 'FilterReport' isn't a type.
void logReport(FilterReport r) {
^^^^^^^^^^^^
tool/get.dart:166:17: Error: Method not found: 'filterTimeZoneData'.
final allDb = filterTimeZoneData(db);
^^^^^^^^^^^^^^^^^^
tool/get.dart:170:60: Error: Getter not found: 'commonLocations'.
final commonDb = filterTimeZoneData(allDb.db, locations: commonLocations);
^^^^^^^^^^^^^^^
tool/get.dart:170:20: Error: Method not found: 'filterTimeZoneData'.
final commonDb = filterTimeZoneData(allDb.db, locations: commonLocations);
^^^^^^^^^^^^^^^^^^
tool/get.dart:177:18: Error: Getter not found: 'commonLocations'.
locations: commonLocations);
^^^^^^^^^^^^^^^
tool/get.dart:174:25: Error: Method not found: 'filterTimeZoneData'.
final common_10y_Db = filterTimeZoneData(commonDb.db,
^^^^^^^^^^^^^^^^^^
tool/get.dart:181:23: Error: Method not found: 'join'.
final allOut = File(p.join(outPath, '${source}_all.tzf'));
^^^^
tool/get.dart:182:26: Error: Method not found: 'join'.
final commonOut = File(p.join(outPath, '$source.tzf'));
^^^^
tool/get.dart:183:31: Error: Method not found: 'join'.
final common_10y_Out = File(p.join(outPath, '${source}_10y.tzf'));
^^^^
tool/get.dart:184:29: Error: Method not found: 'tzdbSerialize'.
await allOut.writeAsBytes(tzdbSerialize(allDb.db), flush: true);
^^^^^^^^^^^^^
tool/get.dart:185:32: Error: Method not found: 'tzdbSerialize'.
await commonOut.writeAsBytes(tzdbSerialize(commonDb.db), flush: true);
^^^^^^^^^^^^^
tool/get.dart:186:37: Error: Method not found: 'tzdbSerialize'.
await common_10y_Out.writeAsBytes(tzdbSerialize(common_10y_Db.db),
^^^^^^^^^^^^^
pub finished with exit code 1
I am working on a flutter web project and made no updates to the file but, it seems like there may be a new flutter update that have caused an Invalid Depfile error. I ran "Flutter clean" but, that did not work. It seems like many of the imports arent being
Invalid depfile: /Users/hsi/Documents/buddieswebapp/.dart_tool/flutter_build/2d3c585b346bbabf643bbc9bd57ff66b/kernel_snapshot.d
Invalid depfile: /Users/hsi/Documents/buddieswebapp/.dart_tool/flutter_build/2d3c585b346bbabf643bbc9bd57ff66b/kernel_snapshot.d
lib/Account/AccountDetailsPage.dart:10:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
lib//HomeScreens/HomePage.dart:19:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/image_picker_web.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
lib/Orders/Tracking/TrackingPage.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
Error: Could not resolve the package 'google_maps' in 'package:google_maps/google_maps.dart'.
lib/DispensaryPages/HomeScreens/Map/Map.dart:5:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
lib/Orders/Tracking/TrackingPage.dart:7:8: Error: Not found: 'package:google_maps/google_maps.dart'
import 'package:google_maps/google_maps.dart' hide Icon;
^
lib/DispensaryPages/HomeScreens/Map/Map.dart:4:8: Error: Not found: 'package:google_maps/google_maps.dart'
import 'package:google_maps/google_maps.dart';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3-nullsafety.3/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:9:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:5:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/facebook_web_sdk-0.0.9/lib/src/fb.dart:2:8: Error: Not found: 'dart:js'
import 'dart:js';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_image_picker-0.0.2/lib/src/web_image_picker.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html' as html;
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:4:8: Error: Not found: 'dart:js'
import 'dart:js' as js;
^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:223:31: Error: Type 'html.EventListener' not found.
void removePopStateListener(html.EventListener fn);
^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:287:3: Error: Type 'html.Location' not found.
html.Location get _location => html.window.location;
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:288:3: Error: Type 'html.History' not found.
html.History get _history => html.window.history;
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:291:28: Error: Type 'html.EventListener' not found.
void addPopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:296:31: Error: Type 'html.EventListener' not found.
void removePopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:7: Error: Type 'AnchorElement' not found.
final AnchorElement _urlParsingNode = AnchorElement();
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:7: Error: Type 'Element' not found.
final Element? _baseElement = document.querySelector('base');
^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/script.dart:11:8: Error: Type 'ScriptElement' not found.
Future<ScriptElement> loadScript(
^^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:10:8: Error: Type 'StyleElement' not found.
Future<StyleElement> loadInlineStyle(String style, {String id}) {
^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:28:8: Error: Type 'LinkElement' not found.
Future<LinkElement> loadLink(
^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:4:5: Error: Type 'Element' not found.
Map<Element, Future> _mapper = {};
^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:6:30: Error: Type 'Element' not found.
Future<T> waitLoad<T extends Element>(T element) {
^^^^^^^
lib/Account/AccountDetailsPage.dart:32:10: Error: 'File' isn't a type.
html.File mediaFile =
^^^^
lib/Account/AccountDetailsPage.dart:33:18: Error: Method not found: 'File'.
new html.File(mediaData.data, mediaData.fileName, {'type': mimeType});
^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/image_picker_web.dart:33:16: Error: 'FileUploadInputElement' isn't a type.
final html.FileUploadInputElement input = html.FileUploadInputElement();
^^^^^^^^^^^^^^^^^^^^^^
^^^^
lib/Orders/Tracking/TrackingPage.dart:108:22: Error: The method 'Marker' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Marker'.
final marker = Marker(MarkerOptions()
^^^^^^
lib/Orders/Tracking/TrackingPage.dart:108:29: Error: The method 'MarkerOptions' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'MarkerOptions'.
final marker = Marker(MarkerOptions()
^^^^^^^^^^^^^
lib/Orders/Tracking/TrackingPage.dart:109:22: Error: The method 'LatLng' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LatLng'.
..position = LatLng(order.venue.lat, order.venue.lng)
^^^^^^
lib/Orders/Tracking/TrackingPage.dart:113:26: Error: The method 'Marker' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Marker'.
final userMarker = Marker(MarkerOptions()
^^^^^^
lib/Orders/Tracking/TrackingPage.dart:113:33: Error: The method 'MarkerOptions' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'MarkerOptions'.
final userMarker = Marker(MarkerOptions()
^^^^^^^^^^^^^
lib/Orders/Tracking/TrackingPage.dart:114:22: Error: The method 'LatLng' isn't defined for the class '_TrackingPage'.
- '_TrackingPage' is from 'package:BuddiesWebApp/Orders/Tracking/TrackingPage.dart' ('lib/Orders/Tracking/TrackingPage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LatLng'.
..position = LatLng(userLat, userLong)
^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:40:28: Error: Method not found: 'MapOptions'.
final mapOptions = new MapOptions()
^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:51:11: Error: Method not found: 'GMap'.
new GMap(elem, mapOptions);
^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:44:8: Error: Getter not found: 'platformViewRegistry'.
ui.platformViewRegistry.registerViewFactory(htmlId, (int viewId) {
^^^^^^^^^^^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:37:20: Error: The method 'LatLng' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LatLng'.
var myLatLng = LatLng(myLat, myLong);
^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:38:27: Error: The method 'LatLng' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LatLng'.
var defaultLocation = LatLng(40.7128, -74.0060);
^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:45:20: Error: The method 'DivElement' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'DivElement'.
final elem = DivElement()
^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:53:19: Error: The method 'GMap' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'GMap'.
final map = GMap(elem, mapOptions);
^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:56:13: Error: The method 'InfoWindow' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'InfoWindow'.
InfoWindow(InfoWindowOptions()..content = 'contentString');
^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:56:24: Error: The method 'InfoWindowOptions' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'InfoWindowOptions'.
InfoWindow(InfoWindowOptions()..content = 'contentString');
^^^^^^^^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:58:24: Error: The method 'Marker' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Marker'.
final marker = Marker(MarkerOptions()
^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:58:31: Error: The method 'MarkerOptions' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'MarkerOptions'.
final marker = Marker(MarkerOptions()
^^^^^^^^^^^^^
lib/DispensaryPages/HomeScreens/Map/Map.dart:61:15: Error: The method 'LatLng' isn't defined for the class '_DispensaryMap'.
- '_DispensaryMap' is from 'package:BuddiesWebApp/DispensaryPages/HomeScreens/Map/Map.dart' ('lib/DispensaryPages/HomeScreens/Map/Map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LatLng'.
LatLng(currentDispensaries[i].lat, currentDispensaries[i].lng)
^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:7:16: Error: 'FileUploadInputElement' isn't a type.
final html.FileUploadInputElement input = html.FileUploadInputElement();
^^^^^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:7:47: Error: Method not found: 'FileUploadInputElement'.
final html.FileUploadInputElement input = html.FileUploadInputElement();
^^^^^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:12:20: Error: Method not found: 'FileReader'.
final reader = html.FileReader();
^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:28:16: Error: 'FileUploadInputElement' isn't a type.
final html.FileUploadInputElement input = html.FileUploadInputElement();
^^^^^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:28:47: Error: Method not found: 'FileUploadInputElement'.
final html.FileUploadInputElement input = html.FileUploadInputElement();
^^^^^^^^^^^^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_web-1.0.9/lib/src/web_image_picker.dart:33:20: Error: Method not found: 'FileReader'.
final reader = html.FileReader();
^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:45:14: Error: Method not found: 'allowInterop'.
getPath: allowInterop(strategy.getPath),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:46:15: Error: Method not found: 'allowInterop'.
getState: allowInterop(strategy.getState),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:47:26: Error: Method not found: 'allowInterop'.
addPopStateListener: allowInterop(strategy.addPopStateListener),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:48:25: Error: Method not found: 'allowInterop'.
prepareExternalUrl: allowInterop(strategy.prepareExternalUrl),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:49:16: Error: Method not found: 'allowInterop'.
pushState: allowInterop(strategy.pushState),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:50:19: Error: Method not found: 'allowInterop'.
replaceState: allowInterop(strategy.replaceState),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:51:9: Error: Method not found: 'allowInterop'.
go: allowInterop(strategy.go),
^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:76:53: Error: 'EventListener' isn't a type.
external ui.VoidCallback addPopStateListener(html.EventListener fn);
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:34:44: Error: 'EventListener' isn't a type.
ui.VoidCallback addPopStateListener(html.EventListener fn);
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:97:44: Error: 'EventListener' isn't a type.
ui.VoidCallback addPopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:217:33: Error: 'EventListener' isn't a type.
void addPopStateListener(html.EventListener fn);
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:223:36: Error: 'EventListener' isn't a type.
void removePopStateListener(html.EventListener fn);
^^^^^^^^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:287:39: Error: Getter not found: 'window'.
html.Location get _location => html.window.location;
^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:288:37: Error: Getter not found: 'window'.
html.History get _history => html.window.history;
^^^^^^
../../Desktop/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:291:33: Error: 'EventListener' isn't a type.
void addPopStateListener(html.EventListener fn) {
^^^^^^^^^^^^^
^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:39:15: Error: Method not found: 'LinkElement'.
element = LinkElement()
^^^^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/style.dart:46:5: Error: Getter not found: 'document'.
document.head.append(element);
^^^^^^^^
../../Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/dart_browser_loader-0.0.6+1/lib/src/utils.dart:4:5: Error: 'Element' isn't a type.
Map<Element, Future> _mapper = {};
^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:32:7)
#1 asFileUri (package:vm/kernel_front_end.dart:599:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:738:21)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:554:9)
<asynchronous suspension>
#4 starter (package:flutter_frontend_server/server.dart:180:12)
<asynchronous suspension>
#5 main (file:///opt/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
<asynchronous suspension>
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
** BUILD FAILED **
I ran Flutter clean, flutter pub get, flutter package get and re-installed but, I still can get it to run.I'm not sure which package I need to update. Thanks in advance.
DEBUG DUMP:
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set
to 10.6, but the range of supported deployment target versions is 10.9
to 11.1.99. (in target 'nanopb' from project 'Pods')
** BUILD FAILED **
Try as follow:
Delete dart:html in your flutter project if exists.
Do flutter clean and flutter pub get and try running project.
If still not solved,
Open Android Studio's SDK Manager.
Go to the Android SDK tab.
Under SDK Tools, uncheck Hide Obsolete Packages.
Install Android SDK Tools (Obsolete).
If you have upgrade AS recently that will fix the issue.
If still not solved
Change flutter channel to stable by
flutter channel stable
flutter upgrade
flutter run --debug
--debug args to get more detail when running flutter app.
This bug has been fixed from flutter side, please check with android_sdk on your computer if still not solved (let me know --debug errors if the problem remains).
I solved it by removing:
import 'dart:html';
Since I am not using website, but it was included in the base of create flutter project on the top of the main.dart file.
Make sure to follow the steps of #Blasanka after removing this line:
flutter clean
flutter pub get
The problem is definitely that in future when you need to convert to website, you have only extended your problem to different date. Unless you will not make web version.