Next thing:
java.lang.NoSuchMethodError:
java.util.Date.from(Ljava/time/Instant;)Ljava/util/Date;
its running on desktop but not deployed on mobile..
Thanks for any suggestion..
Next thing:
java.lang.NoSuchMethodError:
java.util.Date.from(Ljava/time/Instant;)Ljava/util/Date;
its running on desktop but not deployed on mobile..
Thanks for any suggestion..
Most of the
java.util.Date
class works on mobile (Android and iOS). However there a few cases that are not available.On Android or iOS if you try
that refers to the Java 8 static method
Date.from(Instant)
, you'll get the exception you mentioned:To solve this issue, you can use the usual constructor instead, which is in turn what the static method uses:
Alternatively you can use the new
java.time
package.