Skip to content

AssertionError: No NameTypeIndex match for SHORT_STANDARD

Published on: January 13, 2020

If you are using the Date() or Calendar.getInstance() class/method to get the 'time;, then you might have somewhere encountered this above-mentioned Crash in Android 8.0/8.1


Solution:
Just replace your –

kotlin
Date.time // or Calendar.getInstance().getTimeInMillis();

to

kotlin
Instant.now().toEpochMilli() // Android 8.0 +

Darshan Pandya