[英]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.