简体   繁体   English

ObjectBox 失败:“FormatException:输入意外结束(在字符 1 处)”

[英]ObjectBox Failure: "FormatException: Unexpected end of input (at character 1)"

I get the failure我得到了失败

[SEVERE] objectbox_generator:generator on lib/$lib$:

FormatException: Unexpected end of input (at character 1)

^

[INFO] Running build completed, took 3.9s
[INFO] Caching finalized dependency graph completed, took 529ms
[SEVERE] Failed after 4.5s

I condensed my class already to我已经将我的 class 压缩到

import 'package:objectbox/objectbox.dart';
@Entity()
class CleaningJobObjectBox {
  @Id()
  int id = 0;
  final String jobId = "";
}

What can I do?我能做什么?

@Entity()
class CleaningJobObjectBox{
@Id()
int id = 0;
  final String jobId;

  CleaningJobObjectBox({required this.jobId});
}

Use this - flutter pub run build_runner build --delete-conflicting-outputs使用这个 - flutter pub run build_runner build --delete-conflicting-outputs

I used the wrong build runner.我使用了错误的构建运行器。 While fixing some issues and copying code from a Dart package to the flutter app and vice versa, I accidentally used flutter pub run build_runner build instead of dart run build_runner build of the Flutter app also for my Dart package - and did not notice for quite a while While fixing some issues and copying code from a Dart package to the flutter app and vice versa, I accidentally used flutter pub run build_runner build instead of dart run build_runner build of the Flutter app also for my Dart package - and did not notice for quite a尽管

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 FormatException:输入意外结束(在字符 1 处)^ - FormatException: Unexpected end of input (at character 1) ^ FormatException: 意外的输入结束(在字符 1 处) - FormatException: Unexpected end of input (at character 1) 未处理的异常:FormatException:意外的输入结束(在字符 1) - Unhandled Exception: FormatException: Unexpected end of input (at character 1) 未处理的异常:FormatException:输入意外结束(在字符 2 处) - Unhandled Exception: FormatException: Unexpected end of input (at character 2) FormatException:输入意外结束(在字符 2 处)^ 在 flutter - FormatException: Unexpected end of input (at character 2) ^ in flutter I/flutter:FormatException:输入意外结束(在字符 1 处) - I/flutter : FormatException: Unexpected end of input (at character 1) 如何处理 http 错误 (FormatException: Unexpected end of input (at character 1)) - How to handle http errors (FormatException: Unexpected end of input (at character 1)) Fluter json decode FormatException: Unexpected end of input (at character 5) - Getiing Exception in fluter json decode FormatException: Unexpected end of input (at character 5) Flutter OperationException(linkException: ResponseFormatException(originalException: FormatException: 输入意外结束(在字符 1 处) - Flutter OperationException(linkException: ResponseFormatException(originalException: FormatException: Unexpected end of input (at character 1) FormatException(FormatException:意外字符(在字符 1 处) - FormatException (FormatException: Unexpected character (at character 1)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM