我有一个项目,前段时间合并了 mapbox-ios-sdk。Mapbox-ios-sdk 已经发生了一些变化,但我也将一些代码侵入其中。所以我尝试将 Mapbox-ios-sdk 从原点合并到我的分支中,经过一番努力,它终于编译好了。但是,我遇到了这个错误:
2012-10-16 19:09:26.466 OfflineSpotty[81420:11f03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find LoadingTile.png (copy from framework 'Resources' folder)'
图像已正确添加到左窗格中。为什么找不到它?
编辑:
它失败的行是:RMRequireAsset(@"LoadingTile.png")
我看到它实际上在 NSAssert 上失败了:
#define RMRequireAsset(asset) NSAssert([[NSBundle mainBundle] pathForResource:[asset stringByReplacingOccurrencesOfString:[@"." stringByAppendingString:[asset pathExtension]] withString:@""] ofType:[asset pathExtension]], @"Unable to find %@ (copy from framework 'Resources' folder)", asset);
更完整的信息
` * 断言失败 -[RMLoadingTileView initWithFrame:], /Users/t2wu/Documents/Xcode_projects/Open_source/mapbox-ios-sdk/MapView/Map/RMLoadingTileView.m:24 2012-10-16 20:24:58.456 OfflineSpotty[ 17713:11f03] *由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法找到 LoadingTile.png(从框架“资源”文件夹复制)”