Java.lang.NoClassDefFoundError: permission failure: Ljava / time / LocalTime;

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.

+4
source share
2 answers

Android , JDK 8. JDK 8 . - http://www.threeten.org/threetenbp/

+4

API . 26 ( Oreo).

0

Source: https://habr.com/ru/post/1652919/


All Articles