Opencv 4.8.0 cannot resolve symbol opencv engine interface

Hi everyone, today I tried to migrate agp from 7.4.1 to 8.1.0 but and gradle wrapper 7.5 to 8.0.
When I did so openCV wouldn’t let me build my project because of errors in AsyncServiceHelper with class OpenCVEngineInterface that for some reason it was unable to load. Has anyone encountered this problem? And if so, will you help me?

I have found the solution!
so because I changed to android gradle 8.0 it didn’t work, since buildFeatures buildConfig and aidl (OpenCVEngineInterface) have been changed to false by default!
so the solution is to add for the OpenCV Model this

    buildFeatures {
        aidl = true
        buildConfig = true

I really hope this will save people time, cheers!

here is the link

1 Like