使用Google-Maps-iOS-SDK(1.8.1)时架构armv7的未定义符号 [英] Undefined symbols for architecture armv7 while using Google-Maps-iOS-SDK (1.8.1)
问题描述
我试图使用cocoapods(0.33.1) Google-Maps-iOS-SDK(1.8.1)。 部署目标版本: iOS 7.0 我添加了这个窗格: 我开始添加头文件和样本地图视图加载代码此处。 我已经正确添加了API密钥。在一个视图控制器的 我为iPhone构建了这个错误(不是模拟器) 架构armv7的未定义符号: 我也试过用google map iOS sdk手动安装(没有cocoapods)。我还添加了链接器标志: 一个NSException抛出描述 - 我只需要使用谷歌地图iOS SDK使用cocoapod或从手动安装。 我在这里错过了什么吗? 编辑 如果有与Pods.xcconfig相关的任何内容,该文件的内容: 看起来链接器找不到一个sdk库。标题存在,但sdk对象 - 文件未链接到项目。 检查此项: BuildSettings-> Linking->其他链接器标记必须具有值$(继承) I am trying to add Google-Maps-iOS-SDK (1.8.1) using cocoapods (0.33.1). Deployment target version: iOS 7.0 I have added this pod: I started adding header file and sample map view loading code from here. I have properly added API keys. In one view controller's I got this error on build for iPhone (not in simulator) Undefined symbols for architecture armv7: I also tried using google map iOS sdk manual installation (without cocoapods). I have also added linker flag: an NSException is thrown with the description -
-[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance. I just need to use google map iOS SDK either using cocoapod or from manual installation. Am I missing anything here? Edit If there is anything related with Pods.xcconfig then here is the content of that file:
It's looks like the linker cannot find a sdk lib. Headers are present, but sdk objects-file not linked to a project. Checking this: BuildSettings->Linking->Other Linker Flags must have a value $(inherited) 这篇关于使用Google-Maps-iOS-SDK(1.8.1)时架构armv7的未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
pod'Google-Maps-iOS-SDK'
,'〜> 1.8'
正确下载并安装sdk。
- (void)viewDidLoad
,
中添加了以下代码:
//创建一个GMSCameraPosition,它告诉地图在缩放级别6显示
//坐标-33.86,151.20。
GMSCameraPosition * camera = [GMSCameraPosition cameraWithLatitude: -33.86
经度:151.20
zoom:6];
GMSMapView * mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
//在地图的中心创建一个标记。
GMSMarker * marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86,151.20);
marker.title = @悉尼;
marker.snippet = @澳大利亚;
marker.map = mapView_;
_OBJC_CLASS _ $ _ GMSMarker,引用自:
DealDetailsViewController.o中的objc-class-ref _OBJC_CLASS _ $ _ GMSMapView,引用自:
DealDetailsViewController.o中的objc-class-ref_OBJC_CLASS _ $ _ GMSCameraPosition,引用自:
DealDetailsViewController.o中的objc-class-ref_OBJC_CLASS _ $ _ GMSServices from:
AppDelegate.o中的objc-class-ref ld:符号(s)未找到架构armv7 clang:错误:linker命令失败,退出代码
1(使用-v查看调用)
-ObjC
。它建立良好,但在运行时显示选择器没有找到像这样的错误崩溃:
- [GMSMapView animateToCameraPosition:]:无法识别选择器发送到实例。
FRAMEWORK_SEARCH_PATHS =$(PODS_ROOT)/ Google-Maps-iOS-SDK$(PODS_ROOT )/ Parse-iOS-SDK
GCC_PREPROCESSOR_DEFINITIONS = $(继承)COCOAPODS = 1
HEADER_SEARCH_PATHS =$ {PODS_ROOT} / Headers$ {PODS_ROOT} / Headers / Bolts$ {PODS_ROOT} / Headers / Facebook-iOS-SDK$ {PODS_ROOT} / Headers / Facebook-iOS-SDK / FacebookSDK$ {PODS_ROOT} / Headers / Google-Maps-iOS-SDK$ {PODS_ROOT} / Headers / Google -Maps-iOS-SDK / GoogleMaps$ {PODS_ROOT} / Headers / MBProgressHUD$ {PODS_ROOT} / Headers / Parse-iOS-SDK$ {PODS_ROOT} / Headers / Reachability$ {PODS_ROOT} / Headers / WYPopoverController
$ b $ OTHER_CFLAGS = $(继承)-isystem$ {PODS_ROOT} / Headers-isystem$ {PODS_ROOT} / Headers / Bolts-isystem$ {PODS_ROOT} / Headers / Facebook -iOS-SDK-isystem$ {PODS_ROOT} / Headers / Facebook-iOS-SDK / FacebookSDK-isystem$ {PODS_ROOT} / Headers / Google-
Maps-iOS-SDK-isystem$ {PODS_ROOT} / Headers / Google-Maps-iOS-SDK / GoogleMaps-isystem$ {PODS_ROOT} / Headers / MBProgressHUD -isystem$ {PODS_ROOT} / Headers / Parse-iOS-SDK-isystem$ {PODS_ROOT} / Headers / Reachability-isystem$ {PODS_ROOT} / Headers / WYPopoverController
OTHER_LDFLAGS = -ObjC -lc ++ -licucore -lsqlite3 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework GLKit -framework GoogleMaps -framework ImageIO -framework MobileCoreServices -framework OpenGLES -framework Parse - 框架QuartzCore -framework安全框架StoreKit框架SystemConfiguration框架UIKit -weak_framework帐户-weak_framework AdSupport -weak_framework安全-weak_framework社会
PODS_ROOT = $ {SRCROOT} /豆荚
pod 'Google-Maps-iOS-SDK'
, '~> 1.8'
Downloaded and installed sdk properly.- (void)viewDidLoad
,
I have added following code: // Create a GMSCameraPosition that tells the map to display the
// coordinate -33.86,151.20 at zoom level 6.
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86
longitude:151.20
zoom:6];
GMSMapView *mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86, 151.20);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.map = mapView_;
"_OBJC_CLASS_$_GMSMarker", referenced from:
objc-class-ref in DealDetailsViewController.o "_OBJC_CLASS_$_GMSMapView", referenced from:
objc-class-ref in DealDetailsViewController.o "_OBJC_CLASS_$_GMSCameraPosition", referenced from:
objc-class-ref in DealDetailsViewController.o "_OBJC_CLASS_$_GMSServices", referenced from:
objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code
1 (use -v to see invocation)-ObjC
. It builds fine but crash on runtime showing selector not found error like this:FRAMEWORK_SEARCH_PATHS = "$(PODS_ROOT)/Google-Maps-iOS-SDK" "$(PODS_ROOT)/Parse-iOS-SDK"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Bolts" "${PODS_ROOT}/Headers/Facebook-iOS-SDK" "${PODS_ROOT}/Headers/Facebook-iOS-SDK/FacebookSDK" "${PODS_ROOT}/Headers/Google-Maps-iOS-SDK" "${PODS_ROOT}/Headers/Google-Maps-iOS-SDK/GoogleMaps" "${PODS_ROOT}/Headers/MBProgressHUD" "${PODS_ROOT}/Headers/Parse-iOS-SDK" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/WYPopoverController"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/Bolts" -isystem "${PODS_ROOT}/Headers/Facebook-iOS-SDK" -isystem "${PODS_ROOT}/Headers/Facebook-iOS-SDK/FacebookSDK" -isystem "${PODS_ROOT}/Headers/Google-
Maps-iOS-SDK" -isystem "${PODS_ROOT}/Headers/Google-Maps-iOS-SDK/GoogleMaps" -isystem "${PODS_ROOT}/Headers/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Parse-iOS-SDK" -isystem "${PODS_ROOT}/Headers/Reachability" -isystem "${PODS_ROOT}/Headers/WYPopoverController"
OTHER_LDFLAGS = -ObjC -lc++ -licucore -lsqlite3 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework GLKit -framework GoogleMaps -framework ImageIO -framework MobileCoreServices -framework OpenGLES -framework Parse -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -weak_framework Accounts -weak_framework AdSupport -weak_framework Security -weak_framework Social
PODS_ROOT = ${SRCROOT}/Pods