且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

'SwiftEntryPlugin' 的重新声明无效

更新时间:2022-12-05 16:25:41

从上面的评论中获取 Nisanth Reddy 的建议并搜索 SwiftEntryPlugin: NSObject 我的搜索范围缩小到 2 个文件.这些文件是 ./my-app/ios/.symlinks/plugins/entry/ios/Classes/SwiftEntryPlugin.swift./my-app/ios/.symlinks/plugins/entry/ios/Classes/SwiftAnimateInPlugin.swift.经过一些试验和错误,似乎两个文件都是必需的(我认为我正在使用的特定 Flutter 包需要冗余的文件),但它们中的代码完全相同,因此我从其中一个中删除了所有代码文件,但将空文件留在目录中,问题已解决.

Taking Nisanth Reddy's advice from the comment above and grepping for SwiftEntryPlugin: NSObject my search was narrowed down to 2 files. The files were ./my-app/ios/.symlinks/plugins/entry/ios/Classes/SwiftEntryPlugin.swift and ./my-app/ios/.symlinks/plugins/entry/ios/Classes/SwiftAnimateInPlugin.swift. After some trial and error, it seems like both files are required (the redundant one being required by a particular Flutter package I'm using, I think) but both had the exact same code in them so I removed all the code from one of the files but left the empty file sitting there in the directory and the problem was resolved.