我正在调试Android Studio中的Gradle问题,并看到“运行Gradle同步”的引用,但我不确定如何运行这个命令。

我如何运行“Gradle同步”从Android工作室或Mac终端?


当前回答

我认为这是指工具> Android >“同步项目与Gradle文件”从Android工作室的主菜单。

其他回答

Android studio应该在工具栏中有这个按钮,标记为“同步项目与Gradle文件”

编辑:我不知道什么时候改的,但现在看起来是这样的:

编辑:这是它在3.3.1中的样子 或者从菜单栏选择文件->与Gradle文件同步项目。

Keyboard shortcut lovers can add a shortcut for running gradle sync manually by going to File -> Settings -> Keymap -> Plugins -> Android Support -> Sync Project with gradle files (Right click on it to add keyboard shortcut) -> Apply -> OK and you are done. Choose any convenient key as your gradle sync shortcut which doesnot conflict with any other shortcut key, (I have choosen Shift + 5 as my gradle sync key), so next when you want to run gradle sync manually just press this keyboard shortcut key.

快捷方式(Ubuntu, Windows):

Ctrl + F5

将项目与Gradle文件同步。

我认为这是指工具> Android >“同步项目与Gradle文件”从Android工作室的主菜单。

在Android Studio 3.3中,它在这里:

根据Android Studio 3.1中的答案https://stackoverflow.com/a/49576954/2914140,它在这里:

该命令被移动到文件>同步项目与Gradle文件。