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.
Related
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
App worked fine for the whole day, while I was frequently rebuilding it, then once I tried to build it again, I kept getting these errors. I didn't add any new dependencies, nor did I do any major changes to the code. I probably tried everything you can find when googling some of these error messages but nothing helped me. If I try to migrate code to new project, it faces the same problem.
The problem seems to be somehow related to cloud firestore as indicated by error messages, when I remove all the refferences to it in my app leaving just firebase auth it builds just fine.
debug console looke like this :
Launching lib\main.dart on Android SDK built for x86 in debug mode... Invalid depfile: C:\FlutterProjects\table_tennis_app\.dart_tool\flutter_build\742478cdbb2672c05d106c6da3c117ec\kernel_snapshot.d Invalid depfile: C:\FlutterProjects\table_tennis_app\.dart_tool\flutter_build\742478cdbb2672c05d106c6da3c117ec\kernel_snapshot.d /C:/src/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; ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:2:8: Error: Not found: 'dart:html' import 'dart:html';
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util' export 'dart:js_util'; ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:102:32: Error: The method 'allowInterop' isn't defined for the class 'Firestore'.
- 'Firestore' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final updateFunctionWrap = allowInterop((transaction) =>
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:300:9: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
- 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop((firestore_interop.DocumentSnapshotJsImpl snapshot) {
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:304:26: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
- 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final errorWrapper = allowInterop((e) => controller.addError(e));
^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:441:9: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
- 'Query' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop((firestore_interop.QuerySnapshotJsImpl snapshot) {
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:445:26: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
- 'Query' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final errorWrapper = allowInterop((e) => controller.addError(e));
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart:761:9: Error: The method 'allowInterop' isn't defined for the class 'QuerySnapshot'.
- 'QuerySnapshot' is from 'package:firebase/src/firestore.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/firestore.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop((s) => callback(DocumentSnapshot.getInstance(s)));
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:51:29: Error: Method not found: 'getProperty'.
map[key] = dartify(util.getProperty(jsObject, key));
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:73:24: Error: Method not found: 'newObject'.
final jsMap = util.newObject();
^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:75:12: Error: Method not found: 'setProperty'.
util.setProperty(jsMap, key, jsify(value));
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:97:12: Error: Method not found: 'allowInterop'.
return allowInterop(dartObject);
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:105:10: Error: Method not found: 'callMethod'.
util.callMethod(jsObject, method, args);
^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:120:24: Error: Method not found: 'promiseToFuture'.
value = await util.promiseToFuture(thenable);
^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:122:14: Error: Method not found: 'hasProperty'.
if (util.hasProperty(e, 'code')) {
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:133:22: Error: Method not found: 'allowInterop'.
PromiseJsImpl<S>(allowInterop((
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:145:5: Error: Method not found: 'allowInterop'.
allowInterop(c.completeError);
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:153:27: Error: Method not found: 'getProperty'.
String get code => util.getProperty(_source, 'code');
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:156:30: Error: Method not found: 'getProperty'. String get message => util.getProperty(_source, 'message');
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:159:27: Error: Method not found: 'getProperty'. String get name => util.getProperty(_source, 'name');
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:162:37: Error: Method not found: 'getProperty'.
Object get serverResponse => util.getProperty(_source, 'serverResponse');
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:165:28: Error: Method not found: 'getProperty'.
String get stack => util.getProperty(_source, 'stack');
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:176:15: Error: Method not found: 'instanceof'. return util.instanceof(object, type);
^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:180:19: Error: Undefined name 'window'. Object? start = window;
^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:185:18: Error: Method not found: 'getProperty'.
start = util.getProperty(start, item);
^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart:330:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
- 'Auth' is from 'package:firebase/src/auth.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final nextWrapper = allowInterop((firebase_interop.UserJsImpl? user) {
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart:334:26: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
- 'Auth' is from 'package:firebase/src/auth.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final errorWrapper = allowInterop((e) => changeController.addError(e));
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart:362:9: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
- 'Auth' is from 'package:firebase/src/auth.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop((firebase_interop.UserJsImpl? user) {
^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart:365:9: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
- 'Auth' is from 'package:firebase/src/auth.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/auth.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop(idTokenChangedController.addError),
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart:156:9: Error: The method 'allowInterop' isn't defined for the class 'DatabaseReference<T>'.
- 'DatabaseReference' is from 'package:firebase/src/database.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop((update) => jsify(transactionUpdate(dartify(update))));
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart:158:28: Error: The method 'allowInterop' isn't defined for the class 'DatabaseReference<T>'.
- 'DatabaseReference' is from 'package:firebase/src/database.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final onCompleteWrap = allowInterop(
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart:291:26: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
- 'Query' is from 'package:firebase/src/database.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final callbackWrap = allowInterop((
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart:320:30: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
- 'Query' is from 'package:firebase/src/database.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
jsObject.once(eventType, allowInterop(
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart:397:24: Error: The method 'allowInterop' isn't defined for the class 'DataSnapshot'.
- 'DataSnapshot' is from 'package:firebase/src/database.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/database.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final actionWrap = allowInterop((d) => action(DataSnapshot.getInstance(d)));
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:312:25: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
- 'UploadTask' is from 'package:firebase/src/storage.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final nextWrapper = allowInterop(
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:318:26: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
- 'UploadTask' is from 'package:firebase/src/storage.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
final onCompletion = allowInterop(() {
^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:329:9: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
- 'UploadTask' is from 'package:firebase/src/storage.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart'). Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
allowInterop(_changeController.addError),
^^^^^^^^^^^^ Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ajs; 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:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
* What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\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 13s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
It might happen due to multiple reasons. You can try:
Delete kernel_snapshot.d and kernel_snapshot.stamp files at
flutter project \.dart_tool\flutter_build\742478cdbb2672c05d106c6da3c117ec.
You might have imported web-only dependency in my pubspec file or check if by mistake you have imported wrong file like import 'dart:html';.
Try flutter pub get because it looks like one of your packages is not found if this did not works then try flutter clean.
Seems like you are using firebase: ^9.0.2 which only supports Web platform and you are trying to build app on Android Device.
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 have created on flutter project in window system. it is running with any errors in window. then I have run the same project on ubuntu. I am facing some kind of path not found errors. I have tried all of these things.
run the : 'pub clean' command.
run the : 'flutter doctor' 0 issue found in this command
created a new project and place all the lib folder into the new project in the ubuntu but still
i am facing these errors in console log.
And there is no single error showing in code editor IntelliJ, I also tried it on Android Studio. I am finding the solution for last 2-3 weeks. but no solution found. here is the console part.
console log:
Running Gradle task 'assembleDebug'...
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:1:8: Error: Error when reading '../../Documents/work/flutter/packages/flutter/lib/cupertino.Dart': No such file or directory
import 'package:flutter/cupertino.Dart';
^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:2:8: Error: Error when reading '../../Documents/work/flutter/packages/flutter/lib/services.Dart': No such file or directory
import 'package:flutter/services.Dart';
^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:10:28: Error: Type 'StatelessWidget' not found.
mixin PortraitModeMixin on StatelessWidget {
^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:12:3: Error: Type 'Widget' not found.
Widget build(BuildContext context) {
^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:12:16: Error: Type 'BuildContext' not found.
Widget build(BuildContext context) {
^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:24:43: Error: Type 'StatefulWidget' not found.
mixin PortraitStatefulModeMixin<T extends StatefulWidget> on State<T> {
^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:24:62: Error: Type 'State' not found.
mixin PortraitStatefulModeMixin<T extends StatefulWidget> on State<T> {
^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:24:62: Error: Expected 0 type arguments.
mixin PortraitStatefulModeMixin<T extends StatefulWidget> on State<T> {
^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:26:3: Error: Type 'Widget' not found.
Widget build(BuildContext context) {
^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:26:16: Error: Type 'BuildContext' not found.
Widget build(BuildContext context) {
^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:12:16: Error: 'BuildContext' isn't a type.
Widget build(BuildContext context) {
^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:14:18: Error: Method not found: 'SizedBox'.
return const SizedBox();
^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:26:16: Error: 'BuildContext' isn't a type.
Widget build(BuildContext context) {
^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:28:18: Error: Method not found: 'SizedBox'.
return const SizedBox();
^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:33:11: Error: Superclass has no method named 'dispose'.
super.dispose();
^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:41:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.portraitUp,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:42:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.portraitDown,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:40:3: Error: Getter not found: 'SystemChrome'.
SystemChrome.setPreferredOrientations([
^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:48:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.portraitUp,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:49:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.portraitDown,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:50:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.landscapeLeft,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:51:5: Error: Getter not found: 'DeviceOrientation'.
DeviceOrientation.landscapeRight,
^^^^^^^^^^^^^^^^^
../../Documents/work/flutter/.pub-cache/hosted/pub.dartlang.org/advance_image_picker-0.0.5+3/lib/widgets/portrait_mode_mixin.dart:47:3: Error: Getter not found: 'SystemChrome'.
SystemChrome.setPreferredOrientations([
^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script '/home/pankaj/Documents/work/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/pankaj/Documents/work/flutter/bin/flutter'' 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 1m 46s
Exception: Gradle task assembleDebug failed with exit code 1
Issue in that is it takes your windows path which you created
I think it may resolve your issue..
Open the project folder path in your terminal and run this command:
flutter clean
Once finish,
Run this command
flutter pub get
If it will not resolve your issue create new project in ubuntu and copy lib folder in your project and replace that lib folder in new project.
I dont know why i keep getting this error at times. Can causes this error.
thanks in advance : )
/G:/ssd%20backup/flutter/packages/flutter/lib/src/foundation/binding.dart:88:3: Error: Type
'ui.Window' not found.
ui.Window get window => ui.window;
^^^^^^^^^
/G:/ssd%20backup/flutter/packages/flutter/lib/src/rendering/view.dart:60:14: Error: Type 'ui.Window'
not found.
required ui.Window window,
^^^^^^^^^
For me I used TextField() in a CupertinoApp() Instead use CupertinoTextField()