Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start example fail #42

Closed
chenzefeng09 opened this issue Mar 15, 2021 · 8 comments
Closed

start example fail #42

chenzefeng09 opened this issue Mar 15, 2021 · 8 comments

Comments

@chenzefeng09
Copy link

按照readme启动example时,执行flutter run 失败。报错如下 :

../lib/src/gesture/scroll_position_with_single_context.dart:37:7: Error: The non-abstract class 'ScrollPositionWithSingleContext' is missing implementations for these members:

  • ViewportOffset.hasPixels
    Try to either
  • provide an implementation,
  • inherit an implementation from a superclass or mixin,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollActivityDelegate {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/rendering/viewport_offset.dart:96:12: Context: 'ViewportOffset.hasPixels' is defined here.
bool get hasPixels;
^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/chenzefeng/Development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991

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

Process 'command '/Users/chenzefeng/Development/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 14s

@andycall
Copy link
Member

需要 flutter 1.22 以上版本

@yuanyan
Copy link
Contributor

yuanyan commented Mar 15, 2021

Flutter version in the kraken/pubspec.yaml

@yuanyan yuanyan closed this as completed Mar 15, 2021
@chenzefeng09
Copy link
Author

安装后报错:

E/DartVM (29022): vm-service: Error: Unhandled exception:
E/DartVM (29022): WebSocketException: Invalid WebSocket upgrade request
E/DartVM (29022):
E/flutter (29022): [ERROR:flutter/runtime/dart_isolate.cc(882)] Unhandled exception:
E/flutter (29022): WebSocketException: Invalid WebSocket upgrade request
Error connecting to the service protocol: failed to connect to
http://127.0.0.1:55543/ufXtD_4_LD0=/

@yuanyan
Copy link
Contributor

yuanyan commented Mar 15, 2021

重新安装下指定版本的 Flutter

@chenzefeng09
Copy link
Author

flutter 的版本已经切到1.22.0了
image

@xmsz
Copy link

xmsz commented Mar 22, 2021

Flutter 2.0.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d7946a68d (4 days ago) • 2021-03-18 17:24:33 -0700
Engine • revision 3459eb2436
Tools • Dart 2.12.2

同样的错误

@abdulhamidalokzai
Copy link

@chenzefeng09 have you solved the problem?

@andycall
Copy link
Member

flutter 2.0 现在还不支持,请切换到 1.22.4 版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants