As抽风:Could not identify launch activity: Default Activity not found Error while Launching activity

来源:互联网 发布:c语言中百分之f 编辑:程序博客网 时间:2024/05/16 19:10

本人也是用As差不多不到时间,现在用的是2.0正式版本! 今天 我就是抽取了一个抽象方法,抽风的as 就报 Could not identify launch activity: Default Activity not found Error while Launching activity 这个,下宝宝一跳,各种撤回都不行,这可咋办,项目还要做不是,于是开启了 stackoverflow ,坑爹的网络不给力! 最后解决的方法找到了:


 帖子上 选中的方法是:




down voteaccepted

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

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


但是坑爹的我没找到相对应的 选项,那不行啊,还得继续啊!在上面的 回答下面还有个 回答如下:




I had the same problem while importing a project into Android Studio, probably caused by the fact that the project has been developed on an earlier version of Android Studio than currently installed on my computer.

What solved it was simply executing:

File -> Invalidate Caches / Restart...

and then clicking on Invalidate and Restart.


上面的那个方法是 清理缓存,返回到上次正常状态!


File -> Invalidate Caches / Restart...

and then clicking on Invalidate and Restart. 等待1到2分钟,ok了。




27down voteaccepted

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

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

0 1
原创粉丝点击