CocoaPods Google Analytics .xcworkspace和.xcodeproj文件

时间:2016-01-08 12:04:08

标签: ios cocoapods

我在.xcworkspace

中有错误
  

ld:找不到框架Pods(null):链接器命令失败并退出   代码1(使用-v查看调用)

我发现pod安装文件夹错误,但我必须构建.xcodeproj,但我不知道为什么他们会在<plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.9.0</version> <executions> <execution> <id>jaxb-test</id> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> <configuration> <forceRegenerate>true</forceRegenerate> <schemaDirectory>src/main/resources</schemaDirectory> <schemaIncludes> <include>sample.xsd</include> </schemaIncludes> <xjbSources> <xjbSource>bindings.xjb</xjbSource> </xjbSources> </configuration> </execution> </executions> <configuration> <extension>true</extension> <args> <arg>-Xsimplify</arg> </args> <plugins> <plugin> <groupId>org.jvnet.jaxb2_commons</groupId> <artifactId>jaxb2-basics</artifactId> <version>0.6.0</version> </plugin> </plugins> </configuration> </plugin> </plugins> 上犯错,并且如果它可能是应用程序部署的问题,有人知道他们为什么会出错?如何隐藏此错误?

2 个答案:

答案 0 :(得分:4)

请按照以下步骤操作:

  • 确保关闭所有 root GET / dashboard#index new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#create destroy_user_session GET /users/sign_out(.:format) devise/sessions#destroy user_password POST /users/password(.:format) passwords#create new_user_password GET /users/password/new(.:format) passwords#new edit_user_password GET /users/password/edit(.:format) passwords#edit PATCH /users/password(.:format) passwords#update PUT /users/password(.:format) passwords#update cancel_user_registration GET /users/cancel(.:format) registrations#cancel user_registration POST /users(.:format) registrations#create new_user_registration GET /users/sign_up(.:format) registrations#new edit_user_registration GET /users/edit(.:format) registrations#edit PATCH /users(.:format) registrations#update PUT /users(.:format) registrations#update DELETE /users(.:format) registrations#destroy impersonate_user GET /users/:id/impersonate(.:format) users#impersonate users GET /users(.:format) users#index user GET /users/:id(.:format) users#show PATCH /users/:id(.:format) users#update PUT /users/:id(.:format) users#update merge_cameras GET /cameras/merge(.:format) cameras#merge cameras GET /cameras(.:format) cameras#index POST /cameras(.:format) cameras#create new_camera GET /cameras/new(.:format) cameras#new edit_camera GET /cameras/:id/edit(.:format) cameras#edit camera GET /cameras/:id(.:format) cameras#show PATCH /cameras/:id(.:format) cameras#update PUT /cameras/:id(.:format) cameras#update DELETE /cameras/:id(.:format) cameras#destroy camera_share_requests GET /share-requests(.:format) camera_share_requests#index POST /share-requests(.:format) camera_share_requests#create new_camera_share_request GET /share-requests/new(.:format) camera_share_requests#new edit_camera_share_request GET /share-requests/:id/edit(.:format) camera_share_requests#edit camera_share_request GET /share-requests/:id(.:format) camera_share_requests#show PATCH /share-requests/:id(.:format) camera_share_requests#update PUT /share-requests/:id(.:format) camera_share_requests#update DELETE /share-requests/:id(.:format) camera_share_requests#destroy snapshots GET /snapshots(.:format) snapshots#index POST /snapshots(.:format) snapshots#create new_snapshot GET /snapshots/new(.:format) snapshots#new edit_snapshot GET /snapshots/:id/edit(.:format) snapshots#edit snapshot GET /snapshots/:id(.:format) snapshots#show PATCH /snapshots/:id(.:format) snapshots#update PUT /snapshots/:id(.:format) snapshots#update DELETE /snapshots/:id(.:format) snapshots#destroy vendors GET /vendors(.:format) vendors#index POST /vendors(.:format) vendors#create new_vendor GET /vendors/new(.:format) vendors#new edit_vendor GET /vendors/:id/edit(.:format) vendors#edit vendor GET /vendors/:id(.:format) vendors#show PATCH /vendors/:id(.:format) vendors#update PUT /vendors/:id(.:format) vendors#update DELETE /vendors/:id(.:format) vendors#destroy PATCH /vendors(.:format) vendors#update vendor_models GET /models(.:format) vendor_models#index POST /models(.:format) vendor_models#create new_vendor_model GET /models/new(.:format) vendor_models#new edit_vendor_model GET /models/:id/edit(.:format) vendor_models#edit vendor_model GET /models/:id(.:format) vendor_models#show PATCH /models/:id(.:format) vendor_models#update PUT /models/:id(.:format) vendor_models#update DELETE /models/:id(.:format) vendor_models#destroy GET /models/load.vendor.model(.:format) vendor_models#load_vendor_model models PATCH /models(.:format) vendor_models#update DELETE /models(.:format) vendor_models#delete map GET /map(.:format) dashboard#map kpi GET /kpi(.:format) dashboard#kpi no_access GET /no_access(.:format) home#no_access cloud_recordings GET /cloud_recordings(.:format) snapshots#index GET /users?q=(.:format) users#show 项目。 (Xcode.xcworkspace)(有时.xcproject仍然开放)
  • 运行 .xcprojectpod install
  • 打开 pod update
  • 清洁构建您的项目

之后你应该能够正常运行。

答案 1 :(得分:1)

正如cocoapods所述,当您第一次在项目中设置cocoapods时,您需要从现在开始使用xcworkspace。你不能直接在xcodeproj上工作。这是因为它需要同时打开Pod和您的应用程序项目。

关闭你的xcodeproj,再也不要打开它。只要在项目中使用cocoapods,就一定要打开xcworkspace并始终在那里工作。