I received the same error. In my case, closing and reopening the project fixed the problem.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: