在模块中找不到 Android Facet [英] No Android Facet Found in Module

查看:30
本文介绍了在模块中找不到 Android Facet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 Eclipse 切换到 Android-Studio.我试图在设置 gradle 文件后运行我的应用程序.该项目构建时没有错误,但是我无法运行我的应用程序,因为没有找到 android facet.

I just switched to Android-Studio from Eclipse. I am trying to run my application after setting up the gradle files. The project builds with no errors, however I can not run my app because there are no android facets found.

当我进入项目结构时,没有构面,也看不到任何添加构面的方法.如何运行我的应用程序?

When I go to project structure there are no facets and I do not see any way to add a facet. How can I run my application?

推荐答案

我通过删除 .idea 文件夹和任何 .iml 文件,然后将项目重新导入到 Android Studio 中解决了这个问题.

I solved it by removing the .idea folder and any .iml files and then re-import the project into Android Studio.

如果导入后出现错误No facet found in module,则需要按照以下步骤操作

If after importing you end up with the error No facet found in module you need to follow this steps

转到Run/Edit Configurations,您将看到至少两个配置,一个是我的项目的原始名称:我们称之为helloWord,另一个名为<强>应用

Go to Run/Edit Configurations and you will see at lest two configurations one with the name of the original name my project: lets call it helloWord and another called app

原来名称为 helloWord 的那个有这个问题,但名为 app 的配置工作正常(我能够运行它)

The one with the original name helloWord was having this problem, but the configuration called app worked fine (I was able to run it)

因此删除带有facet问题的设置helloWord,并将名为app的设置改回我的项目名称helloWord

So delete the setting with the facet problem helloWord and renamed the one called app back to the name of my project helloWord

这篇关于在模块中找不到 Android Facet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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