简体   繁体   English

Gradle 文件按钮从 Android Studio 中消失

[英]Sync Project with Gradle Files button disappeared from Android Studio

Importing an Android project into Android Studio, the error "Design editor is unavailable until next gradle sync" appears:将Android项目导入Android Studio,出现错误“Design editor is available until next gradle sync”:

在此处输入图像描述

You can see that there is no option: Sync Project with Gradle Files:可以看到没有选项:Sync Project with Gradle Files: 在此处输入图像描述

Going to: File -> Settings -> Main Toolbar -> Android.MainToolBarActionGroup -> Sync Projects with Gradle Files转到:文件 -> 设置 -> 主工具栏 -> Android.MainToolBarActionGroup -> 使用 Gradle 文件同步项目

But the Apply option is "off" in the sense of being "locked", so there's no way to change anything:但是 Apply 选项在“锁定”的意义上是“关闭”的,因此无法更改任何内容: 在此处输入图像描述

And all options for Clean Project are not available:并且 Clean Project 的所有选项都不可用:

在此处输入图像描述

Please what to do to fix this?请问如何解决这个问题?

It can be found at the top of Android Studio, or at the top left side.它可以在 Android Studio 的顶部或左上角找到。 左侧屏幕顶部 Look for the little elephants.寻找小象。

This problem was caused because I opened the project in Android Studio.这个问题是因为我在Android Studio中打开项目造成的。 But the right to do is to IMPORT the project.但正确的做法是导入项目。 Thank you very much.非常感谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM