丢失.idea文件夹后,如何在Android Studio中重新创建项目? [英] How to recreate a project in Android Studio after losing the .idea folder?

查看:143
本文介绍了丢失.idea文件夹后,如何在Android Studio中重新创建项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试一些尝试来了解Android Studio IDE的工作原理.我从Google存储库中导入了一个示例项目-Android DataLayer –,它带有一些已配置的模块.然后,我删除了.idea文件夹,并想再次打开该项目,但是在侧边栏面板中,我看到的只是空虚.

I have been trying to understand how Android Studio IDE works by trying out a few things. I imported one of the sample projects –– Android DataLayer –– from Google repo, and it came with a few configured modules. Then I deleted the .idea folder and wanted to open the project again, but in the sidebar panel, all I see is emptiness.

我该怎么做才能重新创建项目?

What can I do to recreate the project?

推荐答案

尝试工具> Android>使用Gradle文件同步项目.如果在完成该过程后一切都没有改变,请关闭并重新打开IDE.

Try Tools > Android > Sync Project with Gradle Files. If nothing changes when that process seems complete, close and reopen the IDE.

如果仍然不能解决问题,请通过文件">关闭项目"关闭项目,使用开发计算机的文件管理器(例如,Ubuntu中的Nautilus,OS X中的Finder)进入项目目录,然后删除.iml 文件.然后,从您选择较早关闭项目时出现的欢迎对话框中,使用导入非Android Studio项目"导入项目.

If that still does not help, close the project via File > Close Project, go into the project directory using your development machine's file manager (e.g., Nautilus in Ubuntu, Finder in OS X), and delete the .iml file. Then, import the project using "Import Non-Android Studio Project" from the welcome dialog that appeared when you chose Close Project earlier.

这篇关于丢失.idea文件夹后,如何在Android Studio中重新创建项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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