2

I'm not sure if I'm going crazy or what, but Android Studio 0.8.0 generates a Mobile + Wear app, but subclasses WatchActivity for the MainActivity of the watch itself. That would be all fine and dandy, but the class does not exist.

What are developers supposed to do? The only ones available, according to the JavaDocs, are android.support.wearable.activity.InsetActivity and android.support.wearable.activity.ConfirmationActivity.

1
  • Google sample code, as well as code snippets from the developers site are often broken and non-functional
    – Tyler
    Jul 17, 2014 at 21:38

2 Answers 2

7

Auto-generated activity template has been changed in Android Studio 0.8.1. Now WatchActivity has been removed and activity class just extends Activity. Try update Android Studio and recreate the app again.

2

It looks like there are a few errors with the generated class (TAG not defined, etc...). It was probably just rushed out. I changed it to extend Activity and everything compiles fine (I'm not at the point where it runs yet, so I'll update when that happens).

EDIT: I was able to run the app on the wearable emulator fine just by extending Activity.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.