在android studio中,无法加载2个构面-未知构面类型:android和android-gradle [英] In android studio,cannot load 2 facets-unknown facet type:android and android-gradle
问题描述
当我打开android studio时,我收到一个错误-错误加载项目:无法加载2个构面.当我单击查看错误时,出现以下内容
When I open android studio I am getting an error- "Error loading project: Cannot load 2 facets. When I clicked to see the error the following appeared
无法加载2个构面.您可以将它们标记为已忽略,以禁止显示此错误通知. 未知方面类型:"android",未知方面类型:"android-gradle"
"2 facets cannot be loaded. You can mark them them as ignored to suppress this error notification. Unknown facet type:'android', Unknown facet type:'android-gradle'
我尝试添加构面(在 项目结构 > 项目设置 > 模块 >单击项目名称,然后单击 Android 以及 Android-Gradle >)但两者均显示为无法加载构面,构面类型未知".在项目设置>构面下> Android和Android-Gradle均显示为无效构面". 我的项目运行顺利.由于所有卡纸而我退出android studio之前强制关闭笔记本电脑时,会发生此问题.之后,每当我打开android studio时,都会发生此问题.我无法运行我的项目.有人可以帮我解决这个问题吗?
I tried to add facets ( In Project Structure > Project settings > Modules > clicked project name, then clicked Android as well as Android-Gradle) But both showed as "cannot load facet, unknown facet type." Under Project settings > Facets > both Android and Android-Gradle are displayed as 'Invalid facets'. My project was running smoothly. This problem occured when I force-closed my laptop before exiting android studio as everything got stuck. After that whenever I open the android studio this problem occurs. I am not able to run my project. Can anyone please help me to solve this?
推荐答案
只需启用Android Support
插件.
- 在Windows中单击
Ctrl+Alt+S
,在Mac中单击Meta+Comma
. - 在顶部搜索栏中输入插件".
- 在右侧将显示一个插件列表,找到
Android Support
插件,选中它,然后单击屏幕底部的OK
.
- Click
Ctrl+Alt+S
in Windows orMeta+Comma
in Mac. - In top search bar type "plugin".
- On right side it will show a list of plugins, find
Android Support
plugin, check it and clickOK
at the bottom of screen.
这是它的外观:
这篇关于在android studio中,无法加载2个构面-未知构面类型:android和android-gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!