小编TmK*_*KVU的帖子

没有弃用方法和向后支持的集成摄像头

我想构建一个应用程序,其中设备的前置摄像头用于将当前图像投影到a SurfaceView.到目前为止我找到的所有教程都是通过使用Cameraandroid.hardware包中的对象来实现的.

但是,这种方法似乎已被弃用.在Android文档之后尝试实现此功能的"新"首选方式时,我收到警告,它只能与API级别21一起使用,这是非常没用的.

所以我想知道目前在应用程序中实现相机功能的首选方法.或者是否有一些API级别低于21的支持库?

提前致谢.

android deprecated android-camera android-5.0-lollipop

4
推荐指数
1
解决办法
4895
查看次数

在Swift中将CocoaPods中的静态库用于Realm失败

从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!不起作用。

我尝试过的其他内容包括:

  • 使用最新的Realm版本(3.15.0)
  • 使用Objective C版本并添加Swift支持,这将不会在RLMSupport.swift文件中生成并提供模块未找到错误。
  • 为Objective C版本添加桥接头。 …

realm cocoapods swift

4
推荐指数
2
解决办法
747
查看次数