This is a known issue related to Xcode previews building all package products dynamically. You may be able to work around it by making the affected products explicitly static, except for the one you are trying to preview, using the type argument - https://developer.apple.com/documentation/swift_packages/product/2878196-library. For example, in this case you could make HAP an explicitly static product. Since the diagnostic mentions more targets being affected, this workaround might unfortunately be an iterative process.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: