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 on IntelliJ 13.0.1. Is there an alternative to this function?
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 :)
Open Gradle tool window with View -> Tool Windows -> Gradle
Start Macro Recording with Edit -> Macros -> Start Recording Macro
In Gradle tool window press Refresh all Gradle projects button
Stop Macro Recording with Edit -> Macros -> Stop Recording Macro
Save Macro with name Gradle sync
Press with right mouse button on IntelliJ IDEA toolbar and choose Customize Menus and Toolbars...
Under Main menu -> Edit -> Macros -> Macro Actions find your Gradle sync Macro, select it and press Edit Action Icon...
Download this icon Sync Project With Gradle Files icon (from documentation http://developer.android.com/google/play-services/setup.html) and select this icon in IDEA dialog window
Now in Menus and Toolbars select last item in Main Toolbar group, press Add After... and select All actions -> Macros -> Gradle sync
Now you have Sync Project with Gradle Files button!
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.
"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"
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.
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
Just in case someone who uses Android studio is experiencing this issue (can't find sync gradle feature), I'm posting my answer here. I'm new to Android, so I had no idea to fix this. What I did was I cleared the AS cache.
File > Invalidate Caches / Restart
Voila! The Gradle sync button is now there.
Related
Importing an Android project into Android Studio, the error "Design editor is unavailable until next gradle sync" appears:
You can see that there is no option: Sync Project with Gradle Files:
Going to: File -> Settings -> Main Toolbar -> Android.MainToolBarActionGroup -> Sync Projects with Gradle Files
But the Apply option is "off" in the sense of being "locked", so there's no way to change anything:
And all options for Clean Project are not available:
Please what to do to fix this?
It can be found at the top of Android Studio, or at the top left side. Look for the little elephants.
This problem was caused because I opened the project in Android Studio. But the right to do is to IMPORT the project.
Thank you very much.
my version is 4.0 but i don't see gradel sync icon or button
how can i find it??
these are my screen
when i google it there are button or icon but i don't have...
where should i find it?....
Change the project structure view - Android.
screen1
In the project structure panel, Gradle Scripts/build.gradle file click.
screen2
If you change code or not match the gradle version, you can see the alert above code editor.
screen2
Another you can find here.
File/Settings/Keymap/Plug-ins/Android/Sync Project with gradle files
And then double-click on it to Add Keyboard Shortcut, setting shortcut.
screen4
Open your gradle. properties file in Android Studio.
Add the following line to the file: ...
Restart Android Studio for your changes to take effect.
Click Sync Project with Gradle Files to sync your project.
or manually
File -> Settings -> Keymap -> Plugins -> Android Support -> Sync Project with gradle files (Right click on it to add keyboard shortcut) -> Apply -> OK
I'm following this Tensorflow tutorial. At the bottom, it says click Sync Now. What exactly is that?
It's the "Sync Project with Gradle Files". And you can press it manually whenever you want.
Generally you want to do it when you change some configs in your Gradle Files like adding dependencies, changed signing configs, change version code, etc.
press Ctrl+Alt+y
to Sync Project with Gradle Files
You can use File -> Sync Project with Gradle Files to sync the project manually.
In 2021 the name of the pption has changes to " Reload All from Disk" in the File dropdown menu ( same as ctrl+alt+y )
This button disappeared from a new 3.1 version of AS Toolbar. Before it showed as:
Now it's missing:
EDIT: They like to keep playing with the toolbar.
Since Android Studio 3.3, the icon has been updated and moved back across to the right:
Original answer:
It hasn't disappeared. They have just moved it between the Save and Sync files button on the far left end of the toolbar.
In Android Studio 3.3 it is here:
Is is available from menu. Tools > Android disappeared, so find it in File > Sync Project with Gradle Files.
For me I did following to make it visible:
Go to File -> settings -> Menus and Tool bar as shown
Click on Restore Default
You should see the Updated Android.MainToolBarGradleGroup as follows:
Click on Apply and restart the Android Studio
If you encounter this issue within a Flutter project and you cannot find the sync method, you can click on the build.gradle file and then click on Open for Editing with Android Studio at the top right. This will open just the Android project in a new Android Studio window and you will be able to see all the Gradle commands then (for example, under File > Sync...).
File > Sync Project With Gradle Files or this shortcut.
If you are creating React Native application, make sure that you opened your project in ~/YourProjectName/android folder
You can use this shortcut Ctrl + Shift + A to get not only sync but also other action if you found trouble to get them.A window will appear 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 on the menu.
I had to open /android/ on its own in Android Studio (you can click Open for Editing in Android Studio in the top right corner) and then you have this options in the toolbar and in File/Synch Project with Gradle Files (when viewing .gradle file).
In Android Studio under 3.1 it's placed in
Tools > Android > Sync Project with Gradle Files
This button disappeared from a new 3.1 version of AS Toolbar. Before it showed as:
Now it's missing:
EDIT: They like to keep playing with the toolbar.
Since Android Studio 3.3, the icon has been updated and moved back across to the right:
Original answer:
It hasn't disappeared. They have just moved it between the Save and Sync files button on the far left end of the toolbar.
In Android Studio 3.3 it is here:
Is is available from menu. Tools > Android disappeared, so find it in File > Sync Project with Gradle Files.
For me I did following to make it visible:
Go to File -> settings -> Menus and Tool bar as shown
Click on Restore Default
You should see the Updated Android.MainToolBarGradleGroup as follows:
Click on Apply and restart the Android Studio
If you encounter this issue within a Flutter project and you cannot find the sync method, you can click on the build.gradle file and then click on Open for Editing with Android Studio at the top right. This will open just the Android project in a new Android Studio window and you will be able to see all the Gradle commands then (for example, under File > Sync...).
File > Sync Project With Gradle Files or this shortcut.
If you are creating React Native application, make sure that you opened your project in ~/YourProjectName/android folder
You can use this shortcut Ctrl + Shift + A to get not only sync but also other action if you found trouble to get them.A window will appear 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 on the menu.
I had to open /android/ on its own in Android Studio (you can click Open for Editing in Android Studio in the top right corner) and then you have this options in the toolbar and in File/Synch Project with Gradle Files (when viewing .gradle file).
In Android Studio under 3.1 it's placed in
Tools > Android > Sync Project with Gradle Files