I just added the google-play-services-lib library to my project and am stuck where I need to \"sync the project with gradle files\", but this button does not exist
There is a useful shortcut Ctrl + Shift + A, after which a window appears and you can type some command that you would like IntelliJ to run. Just type "sync" in there and it will find that command Sync Project with Gradle Files, even if it's not visible in the menu.
The Gradle sync is still there, under Tools -> Android -> Sync with Gradle
If you don't see it, then Intellij needs to re-link your gradle file.
Try closing the project, re-opening by File -> Import Project -> and select your .gradle file
In my Case, One of My plugin, Android support got disabled due to some reason , As soon as I enabled it , and sync it the button automatically showed.
Go to File > Settings > Plugin > Android support(Tick this).
and sync your project.
"Sync Project with Gradle Files" is not present in IntelliJ. However a similar option is available to build all the gradle files together. Go to View --> Tool Windows --> Gradle. A Gradle task panel gets displayed in the right side with the list of apps. Select your app and click the "Refresh all Gradle projects" in the top bar of the Gradle task panel.
Another method is as mentioned by "Avi Arro"
As alternative you can use Refresh all Gradle projects button in Gradle tool window.
I also have not found this button so I made my own :)
View -> Tool Windows -> GradleEdit -> Macros -> Start Recording MacroRefresh all Gradle projects buttonEdit -> Macros -> Stop Recording MacroGradle syncCustomize Menus and Toolbars...Main menu -> Edit -> Macros -> Macro Actions find your Gradle sync Macro, select it and press Edit Action Icon...Menus and Toolbars select last item in Main Toolbar group, press Add After... and select All actions -> Macros -> Gradle syncSync Project with Gradle Files button!I haven`t seen such option in pure IntelliJ. I guess you are developing some android app. You should then switch to Android Studio (based on IntelliJ) where this option is available for sure.
http://developer.android.com/sdk/installing/studio.html