I am developing an application using Android Studio 2.1.2, API level 23. In the class I used the class java.time.LocalTime, but at runtime unhanded exception NoClassDefFoundErrorkills my activity. Googling, I realized that I need to add dependencies to build.gradle, because Android classes are developed using a JDK version older than Java 8 (when the class is added LocalTime).
So I need to write something like: compile "java.time:LocalTime:1.8"
But that will not work.
source
share