Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有
我正在制作一个关于说实话的简单测试的应用程序。我想打开/关闭相机的 LED。谁能告诉我这里的错误在哪里?
这不是错误,而是警告“已弃用的类”,这意味着Camera可以从未来版本的 Android 中删除(不支持)类。
Camera
按照此链接获取新的CameraAPI。
根据Java文档:
不推荐使用的类 >> 注释 @Deprecated 的程序元素是不鼓励程序员使用的程序元素,通常是因为它很危险,或者因为存在更好的替代方案。
要打开手电筒,请阅读此内容>>检查并打开手电筒