Cordova/CDVViewController.h file not found 解决办法

从GitHub上拉了一个很久以前的 Ionic 项目,一build就“biu”了个错误出来,好爽爽~
问了N久的度娘,还是没解决这个’Cordova/CDVViewController.h’ file not found!

我来罗列下百度到的方法:

第一种解决办法

a、In Xcode, go to Preferences… > Locations, then click on the Advanced… button.
b、Make sure the build location radio button is set to “Unique”.
c、Close out the Preferences and Rebuild.

第二种解决办法

a、In build settings add this item to “Header Search Path”
b、”$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include”

第三种解决办法

终端里项目路径下:
a、先 cordova platform rm ios 再 cordova platform add ios ,还是报错!
b、最后 执行了下 cordova platform update ios,然后build一下就OK了,完美~

心累,在博客里记录下,以备不时之需~

0%