Android Studio stack=java.lang.NoClassDefFoundError: Failed resolution of: Landroid/icu/util/Calendar;

安稳与你 提交于 2019-12-05 06:34:13

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!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!