默认的活动不是在Android的工作室发现 [英] Default Activity not found in Android Studio

查看:226
本文介绍了默认的活动不是在Android的工作室发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级到Android 0.2.8工作室,我得到一个错误,指出默认的活动没有找到当我尝试编辑运行配置。

I just upgraded to Android Studio 0.2.8 and I am getting an error that says "Default Activity not found" when I try to edit the run configurations.

当我推出Android工作室我得到这个错误访问被从事件调度线程只允许

When I launch Android Studio I get this error "Access is allowed from event dispatch thread only"

我使用的活动是一个片段的活动。​​

The activity I am using is a fragment activity.

到目前为止,我已经试过重建和失效缓存/重新启动。两人都是没有用的。

So far I've tried rebuilding and invalidate caches/restart. Both were of no use.

请让我知道我能做些什么来解决这个问题。

Please let me know what I can do to fix the problem.

推荐答案

在Android的Studio中,右键单击该项目,并选择打开模块设置。然后去在来源标签在你的模块,找到的的src 文件夹,右键点击它,将它标记为来源(蓝色)。

In Android Studio, right click on the project and choose Open Module Settings. Then go to the Sources tab in your module, find the src folder, right click on it and mark it as Sources (blue color).

编辑:有更高版本的Andr​​oid Studio的任何来源的标签,但您可以编辑在 build.gradle 文件,而不是:< A HREF =htt​​p://stackoverflow.com/a/22028681/1101730> http://stackoverflow.com/a/22028681/1101730 (感谢对此事发表评论乔希)

There is no sources tab in later versions of Android Studio, but you can edit the build.gradle file instead: http://stackoverflow.com/a/22028681/1101730 (thanks for comment Josh)

这篇关于默认的活动不是在Android的工作室发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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