Pod install 报错 Undefined symbol: _OBJC_CLASS_$_xxx 的解决方法

这篇具有很好参考价值的文章主要介绍了Pod install 报错 Undefined symbol: _OBJC_CLASS_$_xxx 的解决方法。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

背景:更换新电脑后,将旧电脑数据迁移 同步到新电脑,处于异常报错,由于项目为Flutter混合项目,在connectivity文件报错

报错:
Pod install 报错 Undefined symbol: _OBJC_CLASS_$_xxx 的解决方法,ios,flutter

以前运行报错 Undefined symbol: OBJC_CLASS$_xxx 时,通常都是找不到相应文件的路径导致,解决办法就是去Build Settings 中的文件引用Compile Sources中 重新引用文件,再次pod install即可。

此方案无效,想想环境区别在于,新电脑是M1的新款

M1的电脑运行时,所有pod的引用文件都报错,无法找到相应文件,需要更改pod的运行的Build Settings 才可以

处理方案:
1、新增 arm64架构
Project -> Build Settings ->Excluded Architectures 为 arm64

2、在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'
    end
    

3、最后运行 pod install文章来源地址https://www.toymoban.com/news/detail-582750.html

到了这里,关于Pod install 报错 Undefined symbol: _OBJC_CLASS_$_xxx 的解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 安装openssl报错:openssl: symbol lookup error: openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0

    首先,安装网上教程对openssl进行了安装 如果Linux系统没网,可现在windows上下载压缩文件,再传到Linux系统 直接在浏览器输入 https://www.openssl.org/source/openssl-1.1.1t.tar.gz 就可以下载下来 然后进行安装 安装完成后执行 验证是否安装成功,结果报错。 网上找了一大推,什么文件复

    2024年01月23日
    浏览(31)
  • pod install报错

    报错内容/Users/xxx/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding\\\': can\\\'t modify frozen String ( FrozenError ) ...... from /Users/xxx/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `top (required)\\\' from /usr/local/bin/pod:23:in `load\\\' from /usr/local/bin/pod:23:in `main\\\' 解决办法 将项目

    2024年02月12日
    浏览(30)
  • Keil5报错:Error: L6218E: Undefined symbol Image$$ARM_LIB_STACK$$ZI$$Limit

    Keil5在创建STM32工程文件后编译报错: Error: L6218E: Undefined symbol Image$$ARM_LIB_STACK$$ZI$$Limit (referred from startup_armcm4.o). 此处考虑到是链接问题,首先点击“魔术棒” → 在“Target”标签下 → 勾选“Use MicroLIB” → 点击”OK“,重新编译。 此时工程报错: Error: L6218E: Undefined symbol __

    2024年04月22日
    浏览(33)
  • pod install 时遇到 Automatically assigning platform `iOS` with version `11.0` on target XXX......

    pod install的时候遇到的问题: [!] CDN: trunk Repo update failed - 2 error(s): CDN: trunk URL couldn\\\'t be downloaded: https://cdn.cocoapods.org/Specs/1/1/7/SDWebImage/5.13.3/SDWebImage.podspec.json Response: Timeout was reached CDN: trunk URL couldn\\\'t be downloaded: https://cdn.cocoapods.org/Specs/1/1/7/SDWebImage/5.13.4/SDWebImage.podspec.json Respo

    2024年02月16日
    浏览(32)
  • Pod Install 报错失败解决方法

    很久没跑ios项目,今天pod Install报这个错,记录一下  1,解决方案 检查一下 master 文件夹是否存在,如果存在 master 文件夹,执行 pod repo remove master。不存在则跳过这一条命令。 接下来继续执行以下命令  如果失败,尝试科学上网。 此时应该已经解决问题了。 2,切换远程分

    2024年02月15日
    浏览(39)
  • XCode14创建的项目 pod init或pod install报错

    ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### Command ``` /Users/xinhualong/.rvm/gems/ruby-3.0.0/bin/pod install ``` ### Report * What did you do? * What did you expect to happen? * What happened

    2024年02月06日
    浏览(28)
  • keil报错:main.c(99): error: #20: identifier “xxx“ is undefined

    报错如下: main.c(116): main.c(116): error:  #20: identifier \\\"g_pol_par_linear\\\" is undefined main.c(99): error:  #20: identifier \\\"g_motor_sta_linear\\\" is undefined main Interpolation_Linear.c 我认为在主函数里引用了“Interpolation_Linear”的头文件,就包含了里面定义的变量。 但是会报错。 解决办法:在主函数加ex

    2024年02月07日
    浏览(37)
  • 报错TypeError: Class extends value undefined is not a constructor or null

    在执行npm run build的时候遇到了错误:TypeError: Class extends value undefined is not a constructor or null;而执行npm run serve是可以正常执行的,报错如下: Building for production... ERROR  TypeError: Class extends value undefined is not a constructor or null TypeError: Class extends value undefined is not a constructor or null

    2024年02月16日
    浏览(36)
  • MDK编译报错Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_md.0)

    .ObjectsSTM32_MD.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_md.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 1 error messages. “.ObjectsSTM32_MD.axf” - 1 Error(s), 0 Warning(s). Target not created.

    2024年02月16日
    浏览(24)
  • Keil写STM32程序.axf: Error: L6218E: Undefined symbol HAL_RTC_Init (referred from rtc.o)报错解决办法

    在写RTC的程序时,报如下的错误:....Outputatk_f103.axf: Error: L6218E: Undefined symbol HAL_RTC_Init (referred from rtc.o) 显示没有定义 网上有很多解决办法,这里提供一种思路 就是可能是由于没有添加相应的驱动文件,所以需要添加相应的stm32的驱动文件到工程中 点击添加文件,我的是

    2024年02月06日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包