<uses-feature> 和 <uses-library> 有什么区别?

What is the difference between <uses-feature> and <uses-library>?

我已经阅读了 android 文档以了解其含义,

< uses-library>

< uses-feature>

但最终还是不清楚两者到底有什么区别。虽然它是一个库,但它也可以被描述为一个特性。如果我们正在创建库或功能,两者有什么用以及何时使用哪一个?

本文来自 App Manifest Overview :

使用功能:

The element allows you to declare hardware and software features your app needs. For example, if your app cannot achieve basic functionality on a device without a compass sensor, you can declare the compass sensor as required with the following manifest tag: ...

<manifest ... >
<uses-feature android:name="android.hardware.sensor.compass"
              android:required="true" />
...</manifest>

使用库:

Specifies a shared library that the application must be linked against.