Sometimes when I reopen an existing Swift UI project in Xcode 12, the component preview pane fails to display previews of components and displays the following error message instead:
NoBuildableEntriesError: active scheme does not build this file Select a scheme that builds a target which contains the current file, or add this file to a target that is built by the current scheme. How can I resolve this and prevent it from happening again?
In particular, how can I:
- "select a scheme that builds a target which contains the current file", and/or
- "add this file to a target that is built by the current scheme."

