Using ClockworkCreating a watch face

Creating a watch face

Create a new project

The quickest way to start building your watch face is with our official template.

Initialize it as clockwork project

clockwork init

You can now add packages to your project.

Build and install your watch face

This will preprocess (if XML Preprocessor is installed) your watch face, build it using gradlew, and install it to a connected device.

clockwork build

If you have multiple devices connected, Clockwork will prompt you to select a device.

⚠️

clockwork build can’t build signed release bundles suitable for uploading to Google Play Console.

Command line options

OptionDescription
-d, --debugIf XML Preprocessor is being used, passes -d to the preprocessor for extra output and retains watchface.xml after building the watchface
-r, --releaseIf true, will run memory footprint evaluator and gradlew bundleRelease
-a, -allAllow incompatible (non Wear OS) ADB devices to be install targets
--non-interactiveAvoid interactive prompts

Debugging

Installation and runtime errors (eg, bad XML, missing resources) can be seen in the logcat by filtering for com.google.wear.watchface.runtime. If you’re not using Android Studio, try:

adb logcat --pid=$(adb shell pidof -s com.google.wear.watchface.runtime)