无法导入 import android.hardware.camera2 类 [英] Can't import import android.hardware.camera2 classes

查看:44
本文介绍了无法导入 import android.hardware.camera2 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 opencv android 库导入我的 android studio,Camera2Renderer 类有很多编译器错误,因为无法导入 android.hardware.camera2 类.

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.

推荐答案

我解决了这个问题.Jim 是对的,我没有正确的目标 API.对于下一个遇到此问题并找到此线程的人,解决方案是您必须确保您的项目和 openCV 的 build.gradle 文件匹配.感谢所有帮助过我的人,圣诞快乐!

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!

这篇关于无法导入 import android.hardware.camera2 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆