无法找到“与Gradle文件同步项目” IntelliJ IDEA中的按钮 [英] Can't find "Sync Project with Gradle Files" button in IntelliJ IDEA

查看:1452
本文介绍了无法找到“与Gradle文件同步项目” IntelliJ IDEA中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚添加了 google-play-services-lib 库到我的项目中,并且卡在需要用gradle文件同步项目的位置,但是此按钮在IntelliJ 13.0.1上不存在。是否有替代这个函数?

解决方案

作为替代方案,您可以使用刷新所有Gradle项目<

我也没有找到这个按钮,所以我做了我自己的:)


  1. 使用查看 - >打开Gradle工具窗口。工具窗口 - > Gradle

  2. 使用编辑 - >开始宏录制宏 - >开始录制宏

  3. 在Gradle工具窗口中按刷新所有Gradle项目

  4. 编辑 - >停止宏录制宏 - >停止录制宏

  5. 将名称保存为 Gradle同步

  6. 在IntelliJ IDEA工具栏上用鼠标右键按下并选择自定义菜单和工具栏...

  7. 主菜单 - >编辑 - >宏 - >宏操作找到您的 Gradle同步宏,选择它并按编辑操作图标...

  8. 下载此图标使用Gradle文件同步项目图标(来自文档 http://developer.android.com/google/play-services/setup.html )并在IDEA对话窗口中选择此图标
  9. 现在在菜单和工具栏中选择主工具栏组,按添加后... 并选择所有操作 - >宏 - > Gradle同步

  10. 现在您有使用Gradle文件同步项目按钮!


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 :)

  1. Open Gradle tool window with View -> Tool Windows -> Gradle
  2. Start Macro Recording with Edit -> Macros -> Start Recording Macro
  3. In Gradle tool window press Refresh all Gradle projects button
  4. Stop Macro Recording with Edit -> Macros -> Stop Recording Macro
  5. Save Macro with name Gradle sync
  6. Press with right mouse button on IntelliJ IDEA toolbar and choose Customize Menus and Toolbars...
  7. Under Main menu -> Edit -> Macros -> Macro Actions find your Gradle sync Macro, select it and press Edit Action Icon...
  8. 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
  9. Now in Menus and Toolbars select last item in Main Toolbar group, press Add After... and select All actions -> Macros -> Gradle sync
  10. Now you have Sync Project with Gradle Files button!

这篇关于无法找到“与Gradle文件同步项目” IntelliJ IDEA中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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