I'm trying to use the library "GeoDB Java SDK". When launched on an emulator with API 23, the application crashes. Here is the stack:

Process: com.example.myprofile.cloudfirebasetest2, PID: 5232 java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/format/DateTimeFormatter; at com.wirefreethought.geodb.client.net.JSON$OffsetDateTimeTypeAdapter.<init>(JSON.java:152) at com.wirefreethought.geodb.client.net.JSON.<init>(JSON.java:47) at com.wirefreethought.geodb.client.net.ApiClient.<init>(ApiClient.java:85) at com.wirefreethought.geodb.client.net.GeoDbApiClient.<init>(GeoDbApiClient.java:26) at com.example.myprofile.cloudfirebasetest2.FragmentCreatContact.onActivityCreated(FragmentCreatContact.java:67) 

Go to the DateTimeFormatter, there we see an error in importing the file, the CompositePrinterParser is underlined in red:

 import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser; 

It turns out that the JSON library class refers to the DateTimeFormatter, which appeared with the 26th API. What can be done in this situation, in addition to upgrading the application to 26?

  • to get such a package and class - Stranger in the Q

0