求助百度地图API问题!我完全按照官网的步骤可是报个错误!!!xcode4 xcode5
来源:互联网 发布:java程序员前景 编辑:程序博客网 时间:2024/06/05 21:04
到这段代码时候就报错:_mapManager = [[BMKMapManager alloc]init];
2013-01-06 14:02:08.839 BaiduMapDemo[716:f803] -[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x6c29000
2013-01-06 14:02:08.846 BaiduMapDemo[716:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x6c29000'
*** First throw call stack:
(0x15c1022 0x1b79cd6 0x15c2cbd 0x1527ed0 0x1527cb2 0xa747d 0x5fa4a 0x12508 0xee4b 0xefda 0x10b34 0x29c0 0x443386 0x444274 0x453183 0x453c38 0x447634 0x23f9ef5 0x1595195 0x14f9ff2 0x14f88da 0x14f7d84 0x14f7c9b 0x443c65 0x445626 0x28e8 0x2845)
terminate called throwing an exception(gdb)
解决:
(1)编译正常,运行报 [UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to此时需要 other linker flags 添加 -all_load参数。
具体:Project ->build settings ->linking->Other Linker flags(2)编译报 Undefined symbols for architecture armv7。请检查有没有添加QuartzCore.framework 和 CoreLocation.framework
(3) BMKMapManager 强烈建议通过单例模式管理起来,并且不要手动调用其release方法。
(4) 进行用户位置定位时除了要设置showsUserLocation = YES,还要在mapView:didUpdateUserLocation:方法中调用setCenterCoordinate:animated
另外一定要在dealloc中,或者其他离开页面的地方调用showsUserLocation= NO,否则会出现第二次push到定位页面时,不会重新定位问题。
(5) 必须至少让一个类保持.mm文件,或者按照官方修改编译器类型。
(6) lipo –create Release-iphoneos/libbaidumapapi.a Release-iphonesimulator/libbaidumapapi.a –output libbaidumapapi.a 如果报错,请改成
lipo –create –output libbaidumapapi.a Release-iphoneos/libbaidumapapi.a Release-iphonesimulator/libbaidumapapi.a 就能解决。
我的是xcode4,以上方法并未解决问题,求助之后才解决了:
方法:targets ->build settings ->linking->Other Linker flags 添加-objc.
Xcode5 iOS7百度地图SDK配置 与错误处理:解决参考http://blog.csdn.net/w2592583/article/details/17850743
- 求助百度地图API问题!我完全按照官网的步骤可是报个错误!!!xcode4 xcode5
- html5地理定位出现问题,求助百度地图API
- 第一个百度地图API的例子
- 网页嵌入百度地图和使用百度地图api自定义地图的详细步骤
- 网页嵌入百度地图和使用百度地图api自定义地图的详细步骤
- 百度地图API出现如下报错,系统时间问题
- 百度地图API的问题集锦
- 使用百度地图API遇到的问题
- 关于百度地图api的key问题
- 百度地图API不能运行的问题
- 百度地图API的定位问题
- 百度地图api在xcode4.5中编译需要注意的事情
- Xcode5 iOS7百度地图SDK配置 与错误处理
- 百度地图api各种问题
- 百度地图API申请问题
- 百度地图------百度infowindow重影问题记录我的
- 百度地图API:自定义多个途经点的导航
- 调用百度地图API报错
- js面向对象与常用
- Facebook登录(Login Button)
- mysql中int、bigint、smallint和tinyint的区别与长度
- java Map 遍历
- opennms二次开发
- 求助百度地图API问题!我完全按照官网的步骤可是报个错误!!!xcode4 xcode5
- C#.Net中获取程序运行时间的两种方法 (转载:陈进学博客)
- AU 2013 没有参加? 没关系,精彩课程也不会错过
- JSON DATE 转换标准(收集)
- windows opengl compile error solution
- 6.2 Accessing Variables in Block Objects
- iar查看运行时间
- SQL 将ID字符串转换为int 类型方便查找
- jobss发布在局域网里访问