Error : WatchActivity cannot be resolved to a type,Why i'm getting this? [duplicate]

血红的双手。 提交于 2019-12-12 09:10:03

问题


Well i have update my Android Sdk to 23 & even Eclips ADT plugin to the latest version.

why i'm getting the error in import library of WatchActivity . And i have already fixed this issue "Update eclipse with Android Development tools 23".

  • When i create a new android project with "Blank Activity" my Src & Layout folder is empty.

  • When i create a new android project with "Blank Wear Activity" it will create scr folder with Activity file bit contains an error WatchActivity cannot be resolved to a type


回答1:


I believe this is just a faulty template, extending e.g. InsetActivity instead of the non-existing WatchActivity works fine. There's also other issues with the template, e.g. inflating the layout in onCreate instead of in onReadyForContent. Please see my sample project at https://github.com/sveinungkb/wear-test for a working template.



来源:https://stackoverflow.com/questions/24463267/error-watchactivity-cannot-be-resolved-to-a-type-why-im-getting-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!