You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用RoboVM部署iOS应用失败:找不到iOS 18.0.1开发者磁盘镜像

解决RoboVM无法部署到iOS 18.0.1设备的问题

我尝试用RoboVM通过Gradle命令部署应用到已连接的设备:

./gradlew launchIOSDevice

执行后抛出错误:

AppLauncher failed with an exception:
java.io.FileNotFoundException: No DeveloperDiskImage.dmg found in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport for iOS version 18.0.1
        at org.robovm.libimobiledevice.util.DeveloperImageResolver.findDeveloperImage(DeveloperImageResolver.java:117)
        at org.robovm.libimobiledevice.util.AppLauncher.mountDeveloperImageIfRequired(AppLauncher.java:631)
        at org.robovm.libimobiledevice.util.AppLauncher.launchInternal(AppLauncher.java:689)
        at org.robovm.libimobiledevice.util.AppLauncher.launch(AppLauncher.java:1153)
        at org.robovm.compiler.target.ios.AppLauncherProcess$1.run(AppLauncherProcess.java:67)

查看指定路径后发现仅存在最高到16.4版本的DeviceSupport文件夹,刚将Xcode更新到16.0版本,推测新版本iOS镜像的存储路径或方式已变更。

当前环境:

  • Xcode:Version 16.0
  • iPad系统版本:18.0.1
  • RoboVM版本:2.3.22

Xcode可以直接部署测试项目到该iPad,也能部署到iOS18.0模拟器,但RoboVM部署失败,推测是RoboVM未适配Xcode16的新镜像存储机制,或者仍在读取旧版本残留内容。


解决方案

1. 确认Developer Disk Image的实际位置

Xcode 16开始,iOS 18+的Developer Disk Image不再存放在传统的DeviceSupport目录,而是会在Xcode连接设备后自动下载到用户目录:

~/Library/Developer/Xcode/iOS DeviceSupport/18.0.1

如果这个目录不存在,先打开Xcode连接你的iPad,等待Xcode完成设备支持文件的下载。

2. 给RoboVM创建路径适配的软链接/复制目录

RoboVM 2.3.22仍在读取旧路径,所以可以手动将iOS 18.0.1的设备支持目录链接到RoboVM期望的位置:

sudo ln -s ~/Library/Developer/Xcode/iOS\ DeviceSupport/18.0.1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/18.0.1

如果软链接无效,直接复制整个目录:

sudo cp -r ~/Library/Developer/Xcode/iOS\ DeviceSupport/18.0.1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/

3. 升级RoboVM到适配Xcode 16的版本

RoboVM的旧版本(如2.3.22)未适配Xcode 16的路径变更,检查并升级到最新的稳定版(如3.0+分支),修改项目的build.gradle中RoboVM的依赖版本后,重新同步Gradle再尝试部署。

4. 清理RoboVM缓存

清理RoboVM的本地缓存,避免残留旧的路径配置:

rm -rf ~/.robovm/cache

之后重新执行部署命令。


内容的提问来源于stack exchange,提问作者user291701

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 03:46:13