异常篇之Activity class {} does not exist(AS)
ps:遇到个奇怪的Error,虽然最终解决了,但还是要记录下来,方便日后查看
开发工具:android studio 2.1
问题:Error type 3 Error: Activity class {} does not exist
根据提示:activity并不存在,但是我是在androidMainfest.xml注册过activity
以下几种解决方式:
(一)build –>clean project(首先考虑,整理项目)
(二)build –>rebuild project
(三)重启android studio
(四)注册activity时,采用 包名.activity的方式,而不是直接.activity (非常重要)
(五)setting–>build,execution,deployment–>instant run –>取消勾线 enable instant run to hot swap code(个人最终解决方式)
若是遇到这样的error:
stackoverflow上的解决方式:
http://stackoverflow.com/questions/20915266/error-type-3-error-activity-class-does-not-exist(英文哦)
还没有评论,来说两句吧...