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

运行失败 #19

Open
onlyfew opened this issue Oct 22, 2019 · 1 comment
Open

运行失败 #19

onlyfew opened this issue Oct 22, 2019 · 1 comment

Comments

@onlyfew
Copy link

onlyfew commented Oct 22, 2019

你好,我在mac机器上下载了最新的flutter 1.10.7,xcode是10.1版本,下载代码后执行flutter run,很多报错类似于下面这样:
../sdk/flutter/packages/flutter/lib/src/rendering/viewport.dart:161:6: Error: This can't be used as metadata; metadata should be a reference to a compile-time constant variable, or a call to a constant constructor. @required ViewportOffset offset, ^ ../sdk/flutter/packages/flutter/lib/src/rendering/viewport.dart:372:6: Error: Getter not found: 'required'. @required RenderSliver child, ^^^^^^^^ ../sdk/flutter/packages/flutter/lib/src/rendering/viewport.dart:372:6: Error: This can't be used as metadata; metadata should be a reference to a compile-time constant variable, or a call to a constant constructor. @required RenderSliver child, ^ ../sdk/flutter/packages/flutter/lib/src/rendering/viewport.dart:373:6: Error: Getter not found: 'required'. @required double scrollOffset, ^^^^^^^^ ../sdk/flutter/packages/flutter/lib/src/rendering/viewport.dart:373:6: Error: This can't be used as metadata; metadata should be a reference to a compile-time constant variable, or a call to a constant constructor. @required double scrollOffset, ^
请问怎么解决?

@yourkiwifruit
Copy link

应该是flutter的版本低了,用flutter2.0.0之后的版本试试呢

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

2 participants