Error: WatchActivity could not be resolved to type, Why am I getting this?

Well, I upgraded my Android Sdk to 23 and even the Eclips ADT plugin to the latest version.

why am I getting an error in the WatchActivity import library. And I already fixed this problem Update eclipse using Android 23 development tools . "

  • When I create a new android project with "Blank Activity", my Src and Layout folder is empty.

  • When I create a new android project with "Blank Wear Activity", it will create a scr folder with the bit of the Activity file containing the error WatchActivity cannot be resolved to a type

enter image description here

enter image description here

+2
source share
1 answer

I believe that this is just an erroneous template, expanding, for example, InsetActivity instead of non-existent WatchActivity works fine. There are also other problems with the template, for example. inflating layout in onCreate instead of onReadyForContent . Please see my sample project https://github.com/sveinungkb/wear-test for a working template.

+4
source

Source: https://habr.com/ru/post/971441/


All Articles