"Active scheme does not build this file" Problem

I am writing to seek assistance regarding an error I encountered when attempting to download and open files from another computer. Upon downloading the files and attempting to open the code on my computer in Xcode, I received the following error message: "Cannot preview in this file. 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.)"

I have attempted several solutions to fix it, such as deleting derived data, re-opening Xcode, and restarting my computer, but none of them resolved the issue. I would greatly appreciate your guidance and support in resolving this matter.

Additionally, I have included the diagnostics and report related to the error for your reference. Thank you!

== PREVIEW UPDATE ERROR:

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.

I think you only get this error when you're trying to preview, say, an iOS Home Screen widget but your active scheme is for something else, like a watchOS target.

If you're previewing something in an iOS target, make sure to select the scheme that builds the iOS target.

If you're trying to preview a watchOS target, select the watchOS scheme, etc.

"Active scheme does not build this file" Problem
 
 
Q