1

在 Mac (10.12.1) 和 XCode (8.1) 上使用最新的 Gluon 构建 (4.0.1)。当我运行 launchIPhoneSimulator 任务时,出现以下异常。任何想法可能是什么问题。

还注意到我在本地没有 org/robovm/robovm-dist/ROBOVM_VERSION/unpacked/robovm-ROBOVM_VERSION/bin 目录,如文档中所述。

谢谢

* What went wrong:
Execution failed for task ':launchIPhoneSimulator'.
> org.apache.commons.exec.ExecuteException: Command '/var/folders/1k/0wptgkp92nx0m02tncktfmcw0000gn/T/ios-sim4189806266868947871 showdevicetypes' failed with output: 2016-10-30 09:09:16.601 ios-sim4189806266868947871[31818:4531950] +[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x104d49118
  2016-10-30 09:09:16.601 ios-sim4189806266868947871[31818:4531950] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x104d49118'
  *** First throw call stack:
  (
    0   CoreFoundation                      0x00007fffd536048b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffe9ac2cad objc_exception_throw + 48
    2   CoreFoundation                      0x00007fffd53e1bd4 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00007fffd52d2b55 ___forwarding___ + 1061
    4   CoreFoundation                      0x00007fffd52d26a8 _CF_forwarding_prep_0 + 120
    5   ios-sim4189806266868947871          0x00000001016c3c21 -[iPhoneSimulator showDeviceTypes] + 75
    6   ios-sim4189806266868947871          0x00000001016c5dd1 -[iPhoneSimulator runWithArgc:argv:] + 3111
    7   ios-sim4189806266868947871          0x00000001016c5fb9 main + 101
    8   ios-sim4189806266868947871          0x00000001016c3150 start + 52
    9   ???                                 0x0000000000000002 0x0 + 2
  )
  libc++abi.dylib: terminating with uncaught exception of type NSException (Exit value: 134)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.222 secs
Command '/var/folders/1k/0wptgkp92nx0m02tncktfmcw0000gn/T/ios-sim4189806266868947871 showdevicetypes' failed with output: 2016-10-30 09:09:16.601 ios-sim4189806266868947871[31818:4531950] +[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x104d49118
2016-10-30 09:09:16.601 ios-sim4189806266868947871[31818:4531950] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x104d49118'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fffd536048b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffe9ac2cad objc_exception_throw + 48
    2   CoreFoundation                      0x00007fffd53e1bd4 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00007fffd52d2b55 ___forwarding___ + 1061
    4   CoreFoundation                      0x00007fffd52d26a8 _CF_forwarding_prep_0 + 120
    5   ios-sim4189806266868947871          0x00000001016c3c21 -[iPhoneSimulator showDeviceTypes] + 75
    6   ios-sim4189806266868947871          0x00000001016c5dd1 -[iPhoneSimulator runWithArgc:argv:] + 3111
    7   ios-sim4189806266868947871          0x00000001016c5fb9 main + 101
    8   ios-sim4189806266868947871          0x00000001016c3150 start + 52
    9   ???                                 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException (Exit value: 134)
9:09:16 AM: External task execution finished 'launchIPhoneSimulator'.

编辑:

我在 /.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robovm-dist/2.2.0/d8127badd4e98b6388f138216231c9b7a2e91fd/unpacked/robovm-2.2.0/bin/ios- 中找到了一个 ios-sim 命令模拟

我认为这是从 gradle 执行的 ios-sim(我正在使用 IntelliJ 插件)。当我使用 showdevicetypes 参数运行上述程序时,会出现与 IDE 中相同的错误。使用 --version 命令运行上述命令会返回版本 3。

那么,ios-sim 和我安装的 XCode 版本(8.1)之间是否存在一些不兼容,或者我正在陷入困境?

此外,这是否会影响问题:https ://github.com/MobiDevelop/robovm/wiki/iOS-10-and-XCode-8-compatibility

任何帮助表示赞赏。

谢谢

4

0 回答 0