问题描述
我将opencv android库导入了我的android studio,由于无法导入android.hardware.camera2
类,所以Camera2Renderer类存在很多编译器错误.
I imported the opencv android library to my android studio and the Camera2Renderer class has a lot of compiler errors because the android.hardware.camera2
classes can't be imported.
推荐答案
我解决了这个问题.吉姆说得对,我没有正确的目标API.对于下一个遇到此问题并找到该线程的人,解决方案是您必须确保项目的build.gradle文件与openCV相匹配.感谢所有帮助我的人和圣诞快乐!
I solved the problem. Jim was right, i did not have the correct target API. For the next person who has this problem and finds this thread, the solution is that you have to make sure that the build.gradle files for your project and your openCV match. Thanks to everyone who helped me, and Merry Christmas!
这篇关于无法导入导入android.hardware.camera2类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!