我想构建一个应用程序,其中设备的前置摄像头用于将当前图像投影到a SurfaceView
.到目前为止我找到的所有教程都是通过使用Camera
android.hardware包中的对象来实现的.
但是,这种方法似乎已被弃用.在Android文档之后尝试实现此功能的"新"首选方式时,我收到警告,它只能与API级别21一起使用,这是非常没用的.
所以我想知道目前在应用程序中实现相机功能的首选方法.或者是否有一些API级别低于21的支持库?
提前致谢.
从Xcode 9开始,可以省略use_frameworks!
Podfile中的标志来使用静态库。但是,当与Pod一起使用时,会RealmSwift
导致以下错误:
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `RealmSwift` depends upon `Realm`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Run Code Online (Sandbox Code Playgroud)
可悲的是,提出的解决方案use_modular_headers!
不起作用。
我尝试过的其他内容包括: