skip to Main Content

Launching libmain.dart on sdk gphone x86 64 arm64 in debug mode…
: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

export ‘src/expect/expect.dart’ show expect, expectLater, fail;
^

: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

import ‘expect.dart’;
^

: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

export ‘src/expect/expect.dart’ show ErrorFormatter;

^
: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

import ‘expect.dart’;

   ^

: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

import ‘expect.dart’;
^

: Error: Error when reading ‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/expect.dart’: The system cannot find the file specified.

import ‘expect.dart’;
^

/C:/flutter/flutter/packages/flutter_test/lib/src/_goldens_io.dart:120:7: Error: The method ‘fail’ isn’t defined for the class ‘LocalFileComparator’.

  • ‘LocalFileComparator’ is from ‘package:flutter_test/src/_goldens_io.dart’ (‘/C:/flutter/flutter/packages/flutter_test/lib/src/_goldens_io.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘fail’.
    fail(
    ^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart:1202:7: Error: The method ‘fail’ isn’t defined for the class ‘AutomatedTestWidgetsFlutterBinding’.

  • ‘AutomatedTestWidgetsFlutterBinding’ is from ‘package:flutter_test/src/binding.dart’ (‘/C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘fail’.
    fail(
    ^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart:1208:6: Error: A value of type ‘bool?’ can’t be assigned to a variable of type ‘bool’ because ‘bool?’ is nullable and ‘bool’ isn’t.
    }());

    ^
    /C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart:1853:7: Error: The method ‘fail’ isn’t defined for the class ‘LiveTestWidgetsFlutterBinding’.

  • ‘LiveTestWidgetsFlutterBinding’ is from ‘package:flutter_test/src/binding.dart’ (‘/C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘fail’.
    fail(
    ^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/binding.dart:1859:6: Error: A value of type ‘bool?’ can’t be assigned to a variable of type ‘bool’ because ‘bool?’ is nullable and ‘bool’ isn’t.
    }());
    ^
    /C:/flutter/flutter/packages/flutter_test/lib/src/widget_tester.dart:460:16: Error: Method not found: ‘expect’.
    test_package.expect(actual, matcher, reason: reason, skip: skip);
    ^^^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/widget_tester.dart:477:16: Error: Method not found: ‘expect’.
    test_package.expect(actual, matcher, reason: reason);
    ^^^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/widget_tester.dart:497:23: Error: Method not found: ‘expectLater’.
    return test_package.expectLater(actual, matcher, reason: reason, skip: skip)
    ^^^^^^^^^^^
    /C:/flutter/flutter/packages/flutter_test/lib/src/widget_tester.dart:663:22: Error: Method not found: ‘fail’.
    test_package.fail(
    ^^^^
    : Error: The method ‘expect’ isn’t defined for the class ‘AsyncMatcher’.

  • ‘AsyncMatcher’ is from ‘package:test_api/src/expect/async_matcher.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/async_matcher.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘expect’.

    expect(result,
    ^^^^^^
    : Error: The method ‘fail’ isn’t defined for the class ‘AsyncMatcher’.

  • ‘AsyncMatcher’ is from ‘package:test_api/src/expect/async_matcher.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/async_matcher.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘fail’.
    fail(formatFailure(this, item, realResult as String));
    ^^^^
    : Error: The method ‘formatFailure’ isn’t defined for the class ‘AsyncMatcher’.

  • ‘AsyncMatcher’ is from ‘package:test_api/src/expect/async_matcher.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/async_matcher.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘formatFailure’.
    fail(formatFailure(this, item, realResult as String));
    ^^^^^^^^^^^^^
    : Error: The method ‘fail’ isn’t defined for the class ‘_DoesNotComplete’.

  • ‘_DoesNotComplete’ is from ‘package:test_api/src/expect/future_matchers.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/future_matchers.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘fail’.
    fail(‘Future was not expected to complete but completed with a value of ‘

    ^^^^
    

: Error: The method ‘expect’ isn’t defined for the class ‘_DoesNotComplete’.

  • ‘_DoesNotComplete’ is from ‘package:test_api/src/expect/future_matchers.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/expect/future_matchers.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘expect’.
    expect(pumpEventQueue(), completes);

    ^^^^^^
    : Error: Method not found: ‘expect’.
    expect(pumpEventQueue(), completes);
    ^^^^^^

: Error: Type ‘OperatingSystem’ not found.
final OperatingSystem os;
^^^^^^^^^^^^^^^
: Error: Undefined name ‘OperatingSystem’.
{this.os = OperatingSystem.none, this.inGoogle = false}) {
^^^^^^^^^^^^^^^

: Error: ‘OperatingSystem’ isn’t a type.
final OperatingSystem os;
^^^^^^^^^^^^^^^

: Error: The getter ‘OperatingSystem’ isn’t defined for the class ‘SuitePlatform’.

  • ‘SuitePlatform’ is from ‘package:test_api/src/backend/suite_platform.dart’ (‘../../../../AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/src/backend/suite_platform.dart’).
    Try correcting the name to the name of an existing getter, or defining a getter or field named ‘OperatingSystem’.
    if (runtime.isBrowser && os != OperatingSystem.none) {
    ^^^^^^^^^^^^^^^
    : Error: Undefined name ‘OperatingSystem’.
    os: OperatingSystem.find(map[‘os’] as String),
    ^^^^^^^^^^^^^^^
    : Error: Undefined name ‘OperatingSystem’.
    for (var os in OperatingSystem.all) os.identifier,
    ^^^^^^^^^^^^^^^
    Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script ‘C:flutterflutterpackagesflutter_toolsgradleflutter.gradle’ line: 1157

  • What went wrong:
    Execution failed for task ‘:app:compileFlutterBuildDebug’.

Process ‘command ‘C:flutterflutterbinflutter.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.

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

i tried flutter clean and flutter pub get and then created a new project and added it to fire base as anew project
i deleted pubspec.loc and flutter pub get and the same problem please help

2

Answers


  1. If you remove some dependencies,
    then

    delete the pubspec.lock file.
    then Run pub get again.
    then restart with clean cache.
    then run the project.

    Login or Signup to reply.
    • delete the pubspec.lock file
    • run the flutter clean command
    • run the flutter pub get command
    • run the project again

    This should fix the issue as it gets dependencies with a clean project cache.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search