How to resolve the java.lang.IncompatibleClassChangeError coming due to third party SDK update?

1.1k views Asked by At

My Android project has a dependency on third-party SDK, which internally is using TensorFlow lite. Now I already have my application running without issue on an Android device but as soon as I update the third-party library, rebuild and run the project, I start seeing the below crash and the app isn't able to start on the device.

Caused by: java.lang.IncompatibleClassChangeError: Found interface org.tensorflow.lite.Tensor, but class was expected (declaration of 'org.tensorflow.lite.Tensor' appears in /data/app/~~v0-rg==/com.dummy.sampleapp-yRZ==/base.apk!classes19.dex)
    at com.sdk.ondevicefull.k.a(SourceFile:2031)
    at com.sdk.ondevicefull.k.b(SourceFile:43)
    at com.sdk.ondevicefull.k.a(SourceFile:24)
    at com.sdk.ondevicefull.g.c(SourceFile:2284)
    at com.sdk.ondevicefull.g.d(SourceFile:382)
    at com.sdk.ondevicefull.g$a.a(SourceFile:404)
    at com.sdk.events.d$4.run(SourceFile:502)
    at com.sdk.threading.executors.Executors$1.run(SourceFile:223)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    at ....

What could be causing this error? could there be something missing with the new update of SDK itself? Can I take any measures in my app to prevent it?

0

There are 0 answers