Could not find module 'Lottie' for target '×86_64-apple-ios-simulator'; found: arm64-apple-ios-si...

运行项目到模拟器报错:

Could not find module 'Lottie' for target '×86_64-apple-ios-simulator'; found:

arm64-apple-ios-simulator, at: /Users/xx/Library/Developer/Xcode/DerivedData/

xxx-bqxtwgelwarnqndluiezbyrgldir/Index.noindex/Build/Products/Debug-

iphonesimulator/lottie-ios/Lottie.framework/Modules/Lottie.swiftmodule:


估计是不支持还是什么,大概就是这个意思,解决方法:

在Podfile文件最后加上:

post_install do |installer|

  installer.pods_project.build_configurations.each do |config|

    config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'

    config.build_settings['VALID_ARCHS'] = 'arm64 arm64e armv7 armv7s x86_64 i386'

    config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'

    config.build_settings['HEADER_SEARCH_PATHS'] = '$(PROJECT_DIR)/**'

    config.build_settings['DEVELOPMENT_TEAM'] = ''

  end

end

然后重新pod install,运行,搞定

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容