[英]Where is a "Sync project with gradle files" button in Android Studio 3?
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:自 Android Studio 3.3 起,图标已更新并移回右侧:
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.
他们刚刚在工具栏最左端的“保存和同步文件”按钮之间移动了它。
For me I did following to make it visible:对我来说,我做了以下工作以使其可见:
You should see the Updated Android.MainToolBarGradleGroup as follows:您应该看到 Updated Android.MainToolBarGradleGroup 如下:
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.如果你在 Flutter 项目中遇到这个问题,找不到同步方法,可以点击 build.gradle 文件,然后点击右上角的 Open for Editing with Android Studio。 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...).
这将在新的 Android Studio 窗口中仅打开 Android 项目,然后您将能够看到所有 Gradle 命令(例如,在 File > Sync... 下)。
If you are creating React Native application, make sure that you opened your project in ~/YourProjectName/android
folder如果您正在创建 React Native 应用程序,请确保您在
~/YourProjectName/android
文件夹中打开了您的项目
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.您可以使用此快捷键Ctrl + Shift + A不仅可以同步,还可以在您发现无法获取它们时执行其他操作。将出现一个窗口,您可以键入一些您希望 IntelliJ 运行的命令。 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.
只需在其中输入“sync”,它就会找到命令Sync Project with Gradle Files ,即使它在菜单上不可见。
In Android Studio under 3.1 it's placed in在 3.1 下的 Android Studio 中,它被放置在
Tools > Android > Sync Project with Gradle Files
工具 > Android > 将项目与 Gradle 文件同步
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).我必须在 Android Studio 中单独打开/android/ (您可以单击右上角的 Open for Editing 在 Android Studio 中),然后您可以在工具栏和带有 Gradle 文件的 File/Synch Project(查看.gradle 文件)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.