Android Studio 在删除 git 后不构建项目

Android Studio doesn't build the project after removing git

我有一个 android 项目,它有一些 git 问题,所以我使用以下方法从中删除了 git:

rm -rf .git 

进入项目目录。

然后 git 使用以下方法重新安装:

git init

但现在在 android studio 上,构建项目的选项不起作用,我尝试了锤子图标、制作项目按钮,但点击它没有任何反应。 我有 android 工作室版本 3.5.1。

然后我尝试创建一个新项目,它工作正常并且可以构建。

这是我的屏幕截图,其中包含未生成的项目。

修复了它

File->Sync Project With Gradle Files,选项。

成功了,但不知道为什么。