DFTinc / onyx-android-demo

Demo app for developers that demonstrates the features of the current ONYX SDK
1 stars 3 forks source link

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant #7

Closed kishorejethava closed 4 years ago

kishorejethava commented 4 years ago

Test case

Tested in Devices: Motorola C Plus with v7.0 Motorola Moto G3 v6.0.1 Build Flavor : Debug

Note: I have tried invalidate and Restart several times also disabled Instant Run still getting same error

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant;
        at com.dft.onyxcamera.ui.k.b.a(SourceFile:52)
        at com.dft.onyxcamera.ui.k.b.a(SourceFile:2)
        at com.dft.onyxcamera.ui.k.b$c.run(SourceFile:1)
        at java.lang.Thread.run(Thread.java:761)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "java.time.Instant" on path: DexPathList[[zip file "/data/app/com.dft.onyx50demo-2/base.apk"],nativeLibraryDirectories=[/data/app/com.dft.onyx50demo-2/lib/arm, /data/app/com.dft.onyx50demo-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.dft.onyxcamera.ui.k.b.a(SourceFile:52) 
        at com.dft.onyxcamera.ui.k.b.a(SourceFile:2) 
        at com.dft.onyxcamera.ui.k.b$c.run(SourceFile:1) 
        at java.lang.Thread.run(Thread.java:761) 
cdwheatley commented 4 years ago

Hi Kishore,

I found the issue, it is with an incompatibility with the older version of Android being able to use the java.time.Instant class. I switched to using joda-time, and the error is resolved. Please update to version 6.11.6 of onyx-camera to get the fix.