我看到你在Sources中有嵌套文件夹。使用SPM时,每个新文件夹级别都会创建一个新的目标。请参见https://github.com/apple/swift-package-manager/blob/master/Documentation/Reference.md#source-layouts。我自己从未尝试过,但我认为在这种情况下,您必须在Package文件中声明这些目标,请参见https://github.com/apple/swift-package-manager/blob/master/Documentation/Reference.md#targets。 - Eric Aya