ios - 在模拟器上运行 RoboVM iOS MapView 后出错

标签 ios xcode robovm

**

当我尝试使用 RoboVM IDE 运行 MapView iOs 时,应用程序启动后出现以下错误且没有编译错误,我已尝试将 xcode 更新到最新版本 7.1.1 (7B1005)。

感谢您的帮助。

**

2015-11-14 10:34:25.715 Main[2608:1185315] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named MKMapView'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000108ae2f45 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000108020deb objc_exception_throw + 48
    2   CoreFoundation                      0x0000000108ae2e7d +[NSException raise:format:] + 205
    3   UIKit                               0x0000000106b7d5b1 UINibDecoderDecodeObjectForValue + 312
    4   UIKit                               0x0000000106b7d470 -[UINibDecoder decodeObjectForKey:] + 278
    5   UIKit                               0x00000001069abfe1 -[UIRuntimeConnection initWithCoder:] + 180
    6   UIKit                               0x0000000106b7d73a UINibDecoderDecodeObjectForValue + 705
    7   UIKit                               0x0000000106b7d8fb UINibDecoderDecodeObjectForValue + 1154
    8   UIKit                               0x0000000106b7d470 -[UINibDecoder decodeObjectForKey:] + 278
    9   UIKit                               0x00000001069ab1f3 -[UINib instantiateWithOwner:options:] + 1255
    10  UIKit                               0x0000000106785c16 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
    11  UIKit                               0x0000000106786542 -[UIViewController loadView] + 178
    12  UIKit                               0x00000001067868a0 -[UIViewController loadViewIfRequired] + 138
    13  UIKit                               0x0000000106787013 -[UIViewController view] + 27
    14  UIKit                               0x000000010666051c -[UIWindow addRootViewControllerViewIfPossible] + 61
    15  UIKit                               0x0000000106660c05 -[UIWindow _setHidden:forced:] + 282
    16  UIKit                               0x00000001066724a5 -[UIWindow makeKeyAndVisible] + 42
    17  UIKit                               0x00000001065ec396 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
    18  UIKit                               0x00000001065f29c3 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1750
    19  UIKit                               0x00000001065efba3 -[UIApplication workspaceDidEndTransaction:] + 188
    20  FrontBoardServices                  0x00000001096ec784 -[FBSSerialQueue _performNext] + 192
    21  FrontBoardServices                  0x00000001096ecaf2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    22  CoreFoundation                      0x0000000108a0f011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    23  CoreFoundation                      0x0000000108a04f3c __CFRunLoopDoSources0 + 556
    24  CoreFoundation                      0x0000000108a043f3 __CFRunLoopRun + 867
    25  CoreFoundation                      0x0000000108a03e08 CFRunLoopRunSpecific + 488
    26  UIKit                               0x00000001065ef4f5 -[UIApplication _run] + 402
    27  UIKit                               0x00000001065f430d UIApplicationMain + 171
    28  Main                                0x000000010361a260 [J]org.robovm.apple.uikit.UIApplication.main(ILorg/robovm/rt/bro/ptr/BytePtr$BytePtrPtr;Ljava/lang/String;Ljava/lang/String;)I + 195
    29  Main                                0x000000010361976b [J]org.robovm.apple.uikit.UIApplication.main([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)V + 944
    30  Main                                0x0000000103618930 [j]org.robovm.apple.uikit.UIApplication.main([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)V[clinit] + 68
    31  Main                                0x000000010314dad6 [J]com.datavox.deliver.Main.main([Ljava/lang/String;)V + 171
    32  Main                                0x00000001037c00ae _call0 + 142
    33  Main                                0x00000001037b52ac callVoidMethod + 104
    34  Main                                0x00000001037b7a86 rvmCallVoidClassMethodA + 277
    35  Main                                0x00000001037b7b5a rvmCallVoidClassMethod + 134
    36  Main                                0x00000001037afc5a rvmRun + 217
    37  Main                                0x00000001037a77f5 main + 285
    38  libdyld.dylib                       0x0000000107cc692d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Process finished with exit code 0

最佳答案

好的。 RoboVm 团队回答了我的问题。我只需要在 robovm.xml 配置文件中添加框架。

<frameworks>
    <framework>MapKit</framework>
</frameworks>

关于ios - 在模拟器上运行 RoboVM iOS MapView 后出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33710238/

相关文章:

ios - Swift 获取当前显示的索引 UICollectionView

ios - 可以从 txt 文件中检索信息吗?

ios - 开机黑屏几秒

iphone - 在 iPhone 3GS 和 iPhone 4 上为 Mobile Safari 嵌入 HTML5 视频

ios - 动画 PickerView 高度 Swift

ios - 什么是 WebKitErrorDomain 错误代码 204?

ios - SpriteKit - didMovetoView 未被调用

ios - 如何复制 Xcode 项目以创建免费应用程序的付费版本

ios - 如何在iOS上覆盖UIViewController的功能?