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

查看:435
本文介绍了如何还原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天全站免登陆