OpenCV4.7 Integration Error

Hi there,
I’m new to OpenCV and I’m trying to integrate it to my new Android Project. I was able to import the SDK as a module, but when I added it as a dependency to the app module I got this error:

Execution failed for task ':opencv:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain:

I tried to resolve it on my own with no success. Please somebody help me as I’m running to meet a deadline.

I’m using Android Studio Flamingo and building with gradle-8.0.

Thank you

1 Like