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

下载了项目,编译不过去,刚接触flutter不知道咋办 #18

Open
xhcui2008 opened this issue Jan 31, 2020 · 1 comment
Open

Comments

@xhcui2008
Copy link

`Compiler message:
lib/ui/drawer/common_website.dart:77:35: Error: A function expression can't have a name.
_scrollController.addListener(VoidCallback() {
^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/photo_view-0.2.5/lib/photo_view.dart:279:24: Error: The argument type 'Null Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('/D:/Flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/D:/Flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    stream.addListener(listener);
    ^
    /C:/Users/Administrator/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/photo_view-0.2.5/lib/photo_view.dart:281:29: Error: The argument type 'Null Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('/D:/Flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/D:/Flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    stream.removeListener(listener);
    ^
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script 'D:\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 801

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

Process 'command 'D:\Flutter\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 9s
Finished with error: Gradle task assembleDebug failed with exit code 1
`
是否是环境不兼容的问题呢,请问怎么解决比较好呢

@AsyncHope
Copy link

我也遇到这问题,你解决了吗

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