安装了iOS Cocoapods -pod(MBProgressHUD)时,错误停留在“分析依赖项"中,和“缺少头文件" [英] iOS Cocoapods -pod(MBProgressHUD) installed give error stuck at "Analyzing dependencies" and "Header file missing"

查看:1024
本文介绍了安装了iOS Cocoapods -pod(MBProgressHUD)时,错误停留在“分析依赖项"中,和“缺少头文件"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了2个Pod MBProgessHUDPEPhotocropEditor,直到现在它仍然可以正常工作,但是突然我发现MBProgressHUD.h文件不可用的错误.我尝试使用pod update并再次使用pod install命令,但仍然无法解决问题.当我两个都命中时,命令终端卡在

I have installed 2 pods MBProgessHUD and PEPhotocropEditor it's working correctly till now but suddenly I got error for MBProgressHUD.h file not available. And I tried it with pod update and again pod install command but still not able to solve the problem. When I fier both the command terminal stucked at

分析依赖性.

Analysing dependencies.

并且豆荚呈红色.

推荐答案

我的问题通过以下过程得以解决.

My problem is solved with following procedure.

1)将您的项目备份到其他地方.

1) Take Backup of your Project to other place.

2)打开Terminal,然后使用cd命令转到您的项目目录.

2) open Terminal , and go to your project directory with cd command.

3)首先键入此命令

设置您的广告连播

$ pod repo remove master
$ pod setup
$ pod install

注意
这需要时间.因此,不要惊慌等待几分钟.

Note
It takes time. so, don't panic wait for few minuts.

- 完成所有步骤后,如果您发现

EDIT :- After completing this all if you find error like

找不到MBProgressHUD.h文件(任何与pod相关的头文件)

MBProgressHUD.h file not found ( any of pod related header file)

您还需要遵循此过程.

您需要检查Pod头文件中Pod头文件是否正确符号链接. (所有图像均设置正确)

you need to Check if the pod header files are correctly symlinked in Pods/Headers. (All imagae give with correct setting)

WIKI Cocoapods故障排除进行了简要说明.

WIKI or Cocoapods Troubleshooting gives explaination in brief.

1)如果某些操作似乎不起作用,请首先确保您没有完全覆盖项目构建设置中Pods.xcconfig文件中设置的任何选项.要将值添加到项目的构建设置中的选项中,请在值列表前添加$(继承).

1) If something doesn’t seem to work, first of all ensure that you are not completely overriding any options set from the Pods.xcconfig file in your project’s build settings. To add values to options from your project’s build settings, prepend the value list with $(inherited).

2)如果Xcode找不到依赖项的标头:

2) If Xcode can’t find the headers of the dependencies:

检查Pod头文件是否在Pod/Header中正确地符号链接,并且您没有覆盖HEADER_SEARCH_PATHS(请参阅#1). 确保您的项目正在使用Pods.xcconfig.要选中此选项,请选择项目文件,然后在第二个窗格中再次选择它,然后在第三个窗格中打开信息"部分.在配置下,应为每个需要安装的Pod的配置选择Pods.xcconfig.

Check if the pod header files are correctly symlinked in Pods/Headers and you are not overriding the HEADER_SEARCH_PATHS (see #1). Make sure your project is using the Pods.xcconfig. To check this select your project file, then select it in the second pane again and open the Info section in the third pane. Under configurations you should select Pods.xcconfig for each configurations requiring your installed pods.

如果Xcode仍然找不到它们,那么作为最后的选择,您可以在导入之前添加代码,例如#import"Pods/SSZipArchive.h"

If Xcode still can’t find them, as a last resort you can prepend your imports, e.g. #import "Pods/SSZipArchive.h"

如果仅Headerfile缺少错误,则无需包括以下步骤.

如果某些人找不到合适的选项,请在下面的线条和图像中提供参考.

Below line and image give for reference if some one can't find proper option.

3)如果您收到有关无法识别的C编译器命令行选项的错误,例如 cc1obj:错误:无法识别的命令行选项"-Wno-sign-conversion" :

3) If you're getting errors about unrecognized C compiler command line options, e.g. cc1obj: error: unrecognized command line option "-Wno-sign-conversion":

确保将项目构建设置配置为使用" Apple LLVM编译器"()

Make sure your project build settings are configured to use "Apple LLVM compiler" (clang)

您是否要设置CC,CPP或CXX环境变​​量,例如在您的〜/.profile中?这可能会干扰Xcode的构建过程.从〜/.profile中删除环境变量. 〜/.profile位置

Are you setting the CC, CPP or CXX environment variable, e.g. in your ~/.profile? This may interfere with the Xcode build process. Remove the environment variable from your ~/.profile. ~/ .profile location

1)open Settings > General
2) Scroll to the bottom and open Profiles. If you do not see a "Profiles" section, you do not have a configuration profile installed.

在个人资料"部分中,选择要删除的个人资料.

In the "Profiles" section, select the profile you wish to remove.

4)如果Xcode在链接时抱怨,例如找不到-lPods的库,它没有检测到隐式依赖项:

4) If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:

Go to Product > Edit Scheme
Click on Build
   ![Edit scheme][6]
Add the Pods static library, and make sure it's at the top of the list
Clean and build again.
If that doesn't work, verify that the source for the spec you are trying to include has been pulled from github. Do this by looking in 

/Pods/.如果为空(不应为空),请验证〜/.cocoapods/master//.podspec中是否具有正确的git hub URL. 如果仍然无法使用,请检查您的XCode构建位置设置.转到首选项"->位置"->派生数据"->高级",然后将构建位置设置为相对于工作区".

/Pods/. If it is empty (it should not be), verify that the ~/.cocoapods/master//.podspec has the correct git hub url in it. If still doesn't work, check your XCode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to "Relative to Workspace".

Xcode构建位置设置:- 如果您尝试将应用提交到App Store,但发现组织器"中的产品">存档"没有任何结果: 在Xcode的构建设置"中,找到跳过安装".在您的应用程序目标上,将发布"的值设置为否".重新构建,它应该可以工作.

Xcode Build Location Setting:- If you tried to submit app to App Store, and found that "Product" > "Archive" produce nothing in "Organizer": In Xcode "Build Settings", find "Skip Install". Set the value for "Release" to "NO" on your application target. Build again and it should work.

这篇关于安装了iOS Cocoapods -pod(MBProgressHUD)时,错误停留在“分析依赖项"中,和“缺少头文件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆