sorry my english is not very good but.
i use the calendar class for a alarm app with the alarm manager, but i have a error with the instance of the class calendar. i investiged in other forums but i not find poblem what is. 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());
I had the same problem, changed the import from android.icu.util.Calendar to java.util.Calendar and it work! hope it helps you!
来源:https://stackoverflow.com/questions/40540805/android-studio-stack-java-lang-noclassdeffounderror-failed-resolution-of-landr