未找到 Android 方面,使用 Android Studio 0.2 编译时出现问题 [英] No Android facet found, issues compiling with Android Studio 0.2

查看:37
本文介绍了未找到 Android 方面,使用 Android Studio 0.2 编译时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,按照这个 SO 帖子的建议(抱歉,我会在那里评论,希望我没有足够的声誉)

So, following the advice on this SO post (sorry, I would comment there expect I don't have enough reputation)

Gradle:失败:无法确定执行哪些任务

我从我的 .iml 文件中删除了标签,这允许我进行编译.但是当我在设备上运行 .apk 时,出现错误

I removed the tags from my .iml files, which allows me to compile. But when I go to run the .apk on a device, I get the error

运行 TestProject 时出错:未找到 TestProject 的 Android 方面"

"Error running TestProject: No Android facet found for TestProject"

有人可以帮忙吗,只想重新编写 Android 应用程序!

Can someone help please, just want to get back to writing Android apps!

推荐答案

按照以下步骤将 android facet 添加到您的模块中.

Add an android facet to your module by following below steps.

1) 转到文件菜单 -> 项目结构,或按 (Ctrl+Alt+Shift+S) 快捷键打开项目结构".

1) Go To File Menu -> Project Structure, or press (Ctrl+Alt+Shift+S) shortcut to open "Project Structure".

2) 选择项目设置"选项卡下的方面".(第一列)

2) Select "Facets" which is under the "Project Settings" tab. (First column)

3) 单击位于第二列顶部的+"按钮以添加新方面.

3) Click on "+" button which is at the top of the Second Column to add new facets.

4) 从添加"菜单中选择Android"方面,这将提示另一个对话框来选择一个模块.(选择要应用此方面的模块).

4) Select "Android" facet from that "Add "menu which will prompt another dialog box to select a module. (Select a module to which you want to apply this facet).

5) 选择您的模块,就是这样.:)

5) Select your module and that's it. :)

希望这能解决您的问题.

Hope this will solve your problem.

这篇关于未找到 Android 方面,使用 Android Studio 0.2 编译时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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