“GooglePlus/GooglePlus.h file not found” when trying to build my project

帅比萌擦擦* 提交于 2019-11-27 06:48:16

问题


I get the error

GooglePlus/GooglePlus.h file not found

when I try to build the project. I just added the Google Plus framework into the project, and after that, I tried to import the framework in the app delegate.m file, but I’m just getting this error.


回答1:


I think you have to remove current framework and bundle for Google plus and then download the latest one framework for Google plus from https://developers.google.com/+/mobile/ios/sdk/google-plus-ios-sdk-1.5.1.zip & add them from project's Build_Settings>Build_Phases.

This way i have solved my problem, may be u too can get it.

Thanks K.D




回答2:


Drag and Drop the google-plus-ios-sdk-1.7.1 folder into Framework search path in Build Settings.

Its works fine for me.




回答3:


I had the same problem, under "Build Settings > Search Path > Framework Search Paths" i had

$(inherited)          non-recursive
$(PROJECT_DIR)/My     non-recursive
Project/Frameworks    non-recursive

i think spaces are breaking the directory path changing it to $(PROJECT_DIR)/"My Project"/Frameworks solved my problem..

Take note that My Project is my project name, Frameworks is where my GooglePlus.bundle & .framework, in case yours contains spaces, adding quotation marks corrects it.. for example: $(PROJECT_DIR)/"My Project"/"Google Frameworks".




回答4:


I had the same problem and what got it fixed was removing the spaces from the names of parent folder(s) of the framework. With spaces in the names of parent folder(s), Xcode will show multiple directories in "Framework Search Paths".

And sorry, I could not add it as a comment as I don't have enough reputation.




回答5:


One thing which I was missing adding -ObjC in linker flag , but it did not removed the error. Then I removed #import <GooglePlus/GooglePlus.h> from .pch file and added into my ViewController.h. It worked.




回答6:


I had modified the path of Build Settings->Search Paths->Framework Search Paths to $(PROJECT_DIR)/yourProject/3rdParty/"Google API".

Here, it's important to add the quoter mark. If you miss the mark, then Xcode will know as $(PROJECT_DIR)/yourProject/3rdParty/"Google" and API.




回答7:


Drug&Drop needed framework from Pods/Frameworks of your workspace to YourProject/Frameworks and select "Directory reference"



来源:https://stackoverflow.com/questions/22931651/googleplus-googleplus-h-file-not-found-when-trying-to-build-my-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!