如何恢复 build.gradle 和 .Gradle 文件夹 [英] How to restore build.gradle and .Gradle folder

查看:107
本文介绍了如何恢复 build.gradle 和 .Gradle 文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图解决 Android Studio 的一个问题时,我不小心删除了项目顶部的 .Gradle 文件夹和应用程序中的 build.gradle.我将在 Android Studio 中发布我的项目的屏幕截图.构建选项卡还会生成将模块设为我的应用项目名称"和将模块部署到应用引擎".通常的干净项目,重建......不在那里.

When I was trying to solve an issue with Android Studio I accidentally deleted .Gradle folder at the top of the project and build.gradle from within the app. I will post a screen shot of my project in Android Studio. The build tab also produces "make module my app project name" and "deploy module to app engine". The usual clean project, rebuild.... are not there.

我怎样才能恢复它们?

推荐答案

我从不同的项目中复制了它们并将它们粘贴到我的项目中.那并没有解决问题,我导入了项目 File->new->import 项目,但这仅在我的项目中创建了一个副本.我关闭了该项目并将其从 Android Studio 的项目列表中删除.然后我通过从 Android Studio Projects 文件夹导入它来创建一个项目.它永远停留在 gradle 构建中,我必须手动重新启动 AS.现在我有了我的所有文件,并且项目正在编译.

I copied both from a different project and pasted them in my project. That didn't solve the problem and I imported the project File->new->import project but that only created a duplicate within my project. I closed the project and deleted it from the list of project in Android studio. Then I created a project by importing it from Android Studio Projects folder. It took forever stuck in the gradle build and I have to restart AS manually. Now I have all my files and the project is compiling as it should.

这篇关于如何恢复 build.gradle 和 .Gradle 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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