javaandroidwear-oswatchface

Android Watch: 'cannot resolve symbol' error on GregorianCalendar?


I'm trying to set up a watch using the calendar class. The line:

Calendar mCalendar = new GregorianCalendar(TimeZone.getDefault())

gives me an error:

cannot resolve symbol GregorianCalendar error

What am I doing wrong?


Solution

  • Perhaps you need to add

    import java.util.GregorianCalendar;
    

    to the Java class in question?