Closed Lars-Sommer closed 1 year ago
Thanks for sharing. I'm sure we need more details to diagnose the issue. I'm doing all the development on windows, so feel free to prepare bare minimum project to reproduce the issue and we could start investigation.
Error text smells like reflectable issue, but we need to confirm that.
Thanks alot for your answer 👍 I´ve created a new simple project, installed the automapper and tried it out. It works fine. I then spent the last 3 hours copying all the code and what not from my original project to this test project, hoping to find the cause. The projects are now alike, but unfortunately the error does not occur in the new project. So i´m pretty clueless about the problem right now 🤯 I´ll take a break and look at it with fresh eyes tomorrow.
Pay some attention to pubspec.lock, sometimes it helps wiping it out and have it fresh
Good tip, thanks. I´ve tried deleting the pubspec.lock file, and then run flutter pub get to rebuild it. But the problem still persist.
I copied the project 1:1 in a new folder. Starting the project in the new folder fixed the problem. I have absolutely no clue why this works 🤔
I have a small flutter project with several classes. The
dart_json_mapper
works fine on linux, but on a windows machine I cannot startup the project because of this exception:_NoSuchCapabilityErrorImpl (Requesting mirror on un-marked class,
superclassof
.Location)
If I continue the execution, the same exception occurs on the next class.I run
flutter pub run build_runner watch --delete-conflicting-outputs
to make sure themain.mapper.g.dart
file is up to date.This is my Location class:
pubspec.yaml
build.yaml
Thanks!