**
当我尝试使用 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/
总的来说,我对ruby还比较陌生,我正在为我正在创建的对象编写一些rspec测试用例。许多测试用例都非常基础,我只是想确保正确填充和返回值。我想知道是否有办法使用循环结构来执行此操作。不必为我要测试的每个方法都设置一个assertEquals。例如:describeitem,"TestingtheItem"doit"willhaveanullvaluetostart"doitem=Item.new#HereIcoulddotheitem.name.shouldbe_nil#thenIcoulddoitem.category.shouldbe_nilendend但我想要一些方法来使用
在选择我想要运行操作的频率时,唯一的选项是“每天”、“每小时”和“每10分钟”。谢谢!我想为我的Rails3.1应用程序运行调度程序。 最佳答案 这不是一个优雅的解决方案,但您可以安排它每天运行,并在实际开始工作之前检查日期是否为当月的第一天。 关于ruby-如何每月在Heroku运行一次Scheduler插件?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/8692687/
exe应该在我打开页面时运行。异步进程需要运行。有什么方法可以在ruby中使用两个参数异步运行exe吗?我已经尝试过ruby命令-system()、exec()但它正在等待过程完成。我需要用参数启动exe,无需等待进程完成是否有任何rubygems会支持我的问题? 最佳答案 您可以使用Process.spawn和Process.wait2:pid=Process.spawn'your.exe','--option'#Later...pid,status=Process.wait2pid您的程序将作为解释器的子进程执行。除
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
是的,我知道最好使用webmock,但我想知道如何在RSpec中模拟此方法:defmethod_to_testurl=URI.parseurireq=Net::HTTP::Post.newurl.pathres=Net::HTTP.start(url.host,url.port)do|http|http.requestreq,foo:1endresend这是RSpec:let(:uri){'http://example.com'}specify'HTTPcall'dohttp=mock:httpNet::HTTP.stub!(:start).and_yieldhttphttp.shou
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
Sinatra新手;我正在运行一些rspec测试,但在日志中收到了一堆不需要的噪音。如何消除日志中过多的噪音?我仔细检查了环境是否设置为:test,这意味着记录器级别应设置为WARN而不是DEBUG。spec_helper:require"./app"require"sinatra"require"rspec"require"rack/test"require"database_cleaner"require"factory_girl"set:environment,:testFactoryGirl.definition_file_paths=%w{./factories./test/
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
GivenIamadumbprogrammerandIamusingrspecandIamusingsporkandIwanttodebug...mmm...let'ssaaay,aspecforPhone.那么,我应该把“require'ruby-debug'”行放在哪里,以便在phone_spec.rb的特定点停止处理?(我所要求的只是一个大而粗的箭头,即使是一个有挑战性的程序员也能看到:-3)我已经尝试了很多位置,除非我没有正确测试它们,否则会发生一些奇怪的事情:在spec_helper.rb中的以下位置:require'rubygems'require'spork'
我正在尝试解析一个文本文件,该文件每行包含可变数量的单词和数字,如下所示:foo4.500bar3.001.33foobar如何读取由空格而不是换行符分隔的文件?有什么方法可以设置File("file.txt").foreach方法以使用空格而不是换行符作为分隔符? 最佳答案 接受的答案将slurp文件,这可能是大文本文件的问题。更好的解决方案是IO.foreach.它是惯用的,将按字符流式传输文件:File.foreach(filename,""){|string|putsstring}包含“thisisanexample”结果的