Variable Calendar is not recognized by android

Asked

Viewed 36 times

0

I am declaring so in my project and can not recognize the variable "Cannot resolve Symbol 'Calendar'"

Calendar calendario= new Calendar.getInstance();

1 answer

5


Use:

Calendar calendar = Calendar.getInstance(); 

Do not use new, after all getInstance is a static method.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.