Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
367 views
in Technique[技术] by (71.8m points)

dart - Error After running Flutter Project (Execution failed for task ':app:compileFlutterBuildDebug')

Error:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_drop_shadow_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_inner_glow_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_inner_shadow_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_outer_glow_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/effect/psd_solid_fill_effect.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/layer_data/psd_layer_additional_data.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/psd_image_resource.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/psd_layer_data.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/pvrtc/pvrtc_color_bounding_box.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/tga/tga_info.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/tiff/tiff_info.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/webp/vp8l_color_cache.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/decode_info.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/encoder.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/hdr/hdr_gamma.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/util/interpolation.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/util/point.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/image_exception.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/internal/clamp.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/internal/internal.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/_component_data.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/util/quantizer.dart: Error: The control character U+0000 can only be used in strings and comments.
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/draw/draw_circle.dart:50:6: Error: Type 'Point' not found.
List<Point> _calculateCircumference(Image image, int x0, int y0, int radius) {
     ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/draw/draw_circle.dart:111:31: Error: Type 'Point' not found.
Image _draw(Image image, List<Point> points, int color) {
                              ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/exr/exr_image.dart:11:24: Error: Type 'DecodeInfo' not found.
class ExrImage extends DecodeInfo {
                       ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/exr/exr_part.dart:20:15: Error: Type 'ExrAttribute' not found.
  Map<String, ExrAttribute> attributes = {};
              ^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_data.dart:21:3: Error: Type 'JpegJfif' not found.
  JpegJfif jfif;
  ^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_data.dart:22:3: Error: Type 'JpegAdobe' not found.
  JpegAdobe adobe;
  ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_data.dart:72:3: Error: Type 'JpegInfo' not found.
  JpegInfo readInfo(List<int> bytes) {
  ^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_data.dart:668:24: Error: Type 'JpegComponent' not found.
      JpegFrame frame, JpegComponent component) {
                       ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:181:24: Error: Type 'JpegComponent' not found.
  void _decodeBaseline(JpegComponent component, List zz) {
                       ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:210:23: Error: Type 'JpegComponent' not found.
  void _decodeDCFirst(JpegComponent component, List zz) {
                      ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:217:28: Error: Type 'JpegComponent' not found.
  void _decodeDCSuccessive(JpegComponent component, List zz) {
                           ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:221:23: Error: Type 'JpegComponent' not found.
  void _decodeACFirst(JpegComponent component, List zz) {
                      ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:247:28: Error: Type 'JpegComponent' not found.
  void _decodeACSuccessive(JpegComponent component, dynamic zz) {
                           ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:312:7: Error: Type 'JpegComponent' not found.
      JpegComponent component, dynamic decodeFn, int mcu, int row, int col) {
      ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/jpeg/jpeg_scan.dart:327:21: Error: Type 'JpegComponent' not found.
  void _decodeBlock(JpegComponent component, dynamic decodeFn, int mcu) {
                    ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/png/png_info.dart:6:23: Error: Type 'DecodeInfo' not found.
class PngInfo extends DecodeInfo {
                      ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/layer_data/psd_layer_section_divider.dart:5:38: Error: Type 'PsdLayerData' not found.
class PsdLayerSectionDivider extends PsdLayerData {
                                     ^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/psd_image.dart:13:24: Error: Type 'DecodeInfo' not found.
class PsdImage extends DecodeInfo {
                       ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/psd_layer.dart:35:15: Error: Type 'PsdLayerData' not found.
  Map<String, PsdLayerData> additionalData = {};
              ^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/psd/psd_layer.dart:39:8: Error: Type 'PsdEffect' not found.
  List<PsdEffect> effects = [];
       ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/pvrtc/pvrtc_encoder.dart:289:10: Error: Type 'PvrtcColorBoundingBox' not found.
  static PvrtcColorBoundingBox _calculateBoundingBoxRgb(
         ^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/pvrtc/pvrtc_encoder.dart:322:10: Error: Type 'PvrtcColorBoundingBox' not found.
  static PvrtcColorBoundingBox _calculateBoundingBoxRgba(
         ^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/webp/vp8l.dart:962:3: Error: Type 'VP8LColorCache' not found.
  VP8LColorCache _colorCache;
  ^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/webp/webp_info.dart:7:24: Error: Type 'DecodeInfo' not found.
class WebPInfo extends DecodeInfo {
                       ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/decoder.dart:74:3: Error: Type 'DecodeInfo' not found.
  DecodeInfo startDecode(List<int> bytes);
  ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/exr_decoder.dart:45:3: Error: Type 'DecodeInfo' not found.
  DecodeInfo startDecode(List<int> data) {
  ^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/formats/gif_decoder.dart:15:3: Error: Type 'GifInfo' not found.
  GifInfo info;
  ^^^^^^^
......
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_rectify.dart:8:5: Error: 'Point' isn't a type.
    Point topRight,
    ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_rectify.dart:9:5: Error: 'Point' isn't a type.
    Point bottomLeft,
    ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_rectify.dart:10:5: Error: 'Point' isn't a type.
    Point bottomRight,
    ^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize.dart:17:5: Error: 'Interpolation' isn't a type.
    Interpolation interpolation = Interpolation.nearest}) {
    ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize.dart:17:35: Error: Getter not found: 'Interpolation'.
    Interpolation interpolation = Interpolation.nearest}) {
                                  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize.dart:19:11: Error: Method not found: 'ImageException'.
    throw ImageException('Invalid size');
          ^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize.dart:42:24: Error: Getter not found: 'Interpolation'.
  if (interpolation == Interpolation.average) {
                       ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize.dart:77:31: Error: Getter not found: 'Interpolation'.
  } else if (interpolation == Interpolation.nearest) {
                              ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.19/lib/src/transform/copy_resize_crop_square.dart:9:11: Error: Method not found: 'ImageException'.
    throw

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It seems your Image size is not correctly defined. Use BoxFit widget to adjust the same. Try the link

https://medium.com/flutter-community/how-to-use-images-in-flutter-to-the-point-5542b4412a53


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...