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
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