CocoaPods 出现 Unable to find a pod with name, author, summary, or description matching

今天在用CocoaPods搜索时,发现如下报错

[!] Unable to find a pod with name, author, summary, or description matching `AF`

   

执行 pod setup 其实在你安装 CocoaPods 执行 pod install 时,系统会默认操作 pod setup ,然而由于墙可能会 pod setup 不成功。这时就需要手动执行 pod setup 指令,如下:

pod setup

   

输出:

Setting up CocoaPods master repo

   

稍等几十秒,最底下会输出 Setup completed 说明执行 pod setup 成功。
podsetup.png
如果 pod search 操作还是搜索失败

pod search AFNetworking

   

删除 ~/Library/Caches/CocoaPods 目录下的 search_index.json 文件
pod setup成功后,依然不能 pod search 是因为之前你执行 pod search 生成了 search_index.json 此时需要删掉。

rm ~/Library/Caches/CocoaPods/search_index.json

   

删除成功后,再执行 pod search
podsearch.png

pod search afnetworking

  

输出:

Creating search index for spec repo ‘master’.. Done!

 

pod search 可以使用了

 

在使用 VSCode 进行嵌入式开发时,若遇到 CMSIS-DAP 设备无法识别的错误(报错信息为 `unable to find a matching CMSIS-DAP device`),可以从以下几个方面进行排查和解决: ### 1. 检查硬件连接与设备状态 确保 CMSIS-DAP 设备(如调试器)已正确连接至计算机,并且设备本身处于正常工作状态。可以尝试更换 USB 端口,或使用另一台计算机进行测试,以排除硬件故障或连接问题。 ### 2. 配置 Udev 规则(适用于 Linux 系统) 在 Linux 系统(如 Ubuntu)中,CMSIS-DAP 设备可能因权限问题无法被识别。此时需要配置 udev 规则以确保设备可以被正常访问。具体步骤如下: - 添加用户至 `dialout` 和 `plugdev` 用户组: ```bash sudo usermod -a -G dialout $USER sudo usermod -a -G plugdev $USER ``` - 下载并安装 PlatformIO 的 udev 规则文件: ```bash curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules ``` - 检查 `/etc/udev/rules.d/99-platformio-udev.rules` 文件中是否包含设备对应的 VID 和 PID(例如 `0d28:0204`),若没有则按已有格式添加。 - 重启系统以使规则生效[^3]。 ### 3. 安装 HID API 库(适用于所有系统) CMSIS-DAP 设备依赖于 HID API 库进行通信。如果该库未正确安装或配置,可能导致设备无法被识别。可以在系统中安装或更新 HID API 库以解决此问题。具体步骤包括: - 下载 HID API 库(可以从 [HID API GitHub 仓库](https://github.com/libusb/hidapi) 获取)。 - 编译并安装 HID API 库: ```bash git clone https://github.com/libusb/hidapi.git cd hidapi ./bootstrap ./configure make sudo make install ``` - 在配置 OpenOCD 时指定使用 CMSIS-DAP 驱动,并确保其能够正确调用 HID API 库[^2]。 ### 4. 使用 OpenOCD 并配置 CMSIS-DAP 支持 OpenOCD 是一个常用的调试工具链,支持 CMSIS-DAP 设备。可以通过以下方式配置 OpenOCD: - 下载并编译 OpenOCD: ```bash git clone https://git.code.sf.net/p/openocd/git openocd cd openocd ./configure --enable-cmsis-dap make sudo make install ``` - 创建配置文件以启用 CMSIS-DAP 设备支持,例如 `openocd.cfg`: ```tcl source [find interface/cmsis-dap.cfg] transport select swd source [find target/your_target.cfg] ``` - 启动 OpenOCD 并连接调试器: ```bash openocd -f openocd.cfg ``` ### 5. 更新驱动与软件环境(适用于 Windows 系统) 在 Windows 系统中(尤其是 Windows 11 22H2),CMSIS-DAP 设备可能因驱动问题无法被识别。可以尝试以下操作: - 更新设备驱动程序,确保使用的是最新版本的 CMSIS-DAP 驱动。 - 如果使用 Keil µVision 或其他 IDE,确保其版本支持当前操作系统,并更新至最新版本。 - 尝试多次拔插设备,或使用设备管理器重新扫描硬件更改[^1]。 ### 6. 检查 VSCode 及 PlatformIO 配置 在 VSCode 中使用 PlatformIO 进行开发时,需确保项目配置文件(如 `platformio.ini`)中正确指定了调试器类型和目标设备。例如: ```ini [env:your_environment] platform = your_platform board = your_board debug_tool = cmsis-dap ``` 确保 PlatformIO 插件已正确安装,并更新至最新版本。若问题依旧存在,可尝试重新安装 PlatformIO Core 和相关插件。 ###
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值