I have used the calendar class for a alarm app with the alarm manager, but I have an error with the instance of the class calendar.
I have investigated in other forums but I haven't find the proper solutions.
please I need your help.
the error is marked in the instance of the calendar class enter image description here
As far as i can see, you could just use the normal Calendar instead of the in API 24 introduced ICU Calendar. Try to use this import java.util.Calendar instead of this import android.icu.util.Calendar.
From Calendar pick date:
import java.util.Calendar instead of this import android.icu.util.Calendar
And Then write those code code for Date Pick.
Calendar callForDate = Calendar.getInstance();
java.text.SimpleDateFormat currentDate = new java.text.SimpleDateFormat("dd-MMMM-yyyy");
final String saveCurrentDate = currentDate.format(callForDate.getTime());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With