如何支持在所有具有指纹识别功能的设备上运行应用程序。

huangapple go评论103阅读模式
英文:

how to support app to run on all devices that contain finger print feature

问题

您好,希望您一切顺利。我正在开发一个包含指纹识别功能的应用程序,在其中的某一点上,我启用了一个指纹识别 SDK,其最低 minSdkVersion 为 23。我希望能够在所有设备上运行此应用程序,但当我将 minSdkVersion 更改为 16 时,它无法运行。下面是显示的错误信息:

清单合并失败:uses-sdk:minSdkVersion 16 不能小于库中声明的版本 23 [me.aflak.libraries:fingerprint:2.5.3] C:\Users\Zahid Iqbal\.gradle\caches\transforms-2\files-2.1
清单合并失败:uses-sdk:minSdkVersion 16 不能小于库中声明的版本 23 [me.aflak.libraries:fingerprint:2.5.3] C:\Users\Zahid Iqbal\.gradle\caches\transforms-2\files-2.1\0f64be97807f594934240311bd0e96bb\jetified-fingerprint-2.5.3\AndroidManifest.xml,因为该库可能使用 16 中不可用的 API。
建议:使用最多具有 minSdk 版本 16 的兼容库,
或将此项目的 minSdk 版本增加至少为 23,
或使用 tools:overrideLibrary="me.aflak.libraries" 强制使用(可能导致运行时失败)。
f64be97807f594934240311bd0e96bb\jetified-fingerprint-2.5.3\AndroidManifest.xml,因为该库可能使用 16 中不可用的 API。 建议:使用最多具有 minSdk 版本 16 的兼容库, 或将此项目的 minSdk 版本增加至少为 23, 或使用 tools:overrideLibrary="me.aflak.libraries" 强制使用(可能导致运行时失败)。

下面是 jetified-fingerprint 的清单:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="me.aflak.libraries"
    android:versionCode="37"
    android:versionName="2.5.3">

    <uses-sdk
        android:minSdkVersion="23"
        android:targetSdkVersion="27" />

    <uses-permission android:name="android.permission.USE_FINGERPRINT" />

</manifest>
英文:

hi sir hope you are right. I am working on app that contain fingerprint feature in it at one point and which fingerprint sdk i enabled its min minSdkVersion is 23 and i want to allow this app to run on all devices when i changed minSdkVersion to 16 then its not running. here is the error mesage below which it shows

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [me.aflak.libraries:fingerprint:2.5.3] C:\Users\Zahid Iqbal\.gradle\caches\transforms-2\files-2.1
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [me.aflak.libraries:fingerprint:2.5.3] C:\Users\Zahid Iqbal\.gradle\caches\transforms-2\files-2.1\0f64be97807f594934240311bd0e96bb\jetified-fingerprint-2.5.3\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project&#39;s minSdk version to at least 23,
or use tools:overrideLibrary=&quot;me.aflak.libraries&quot; to force usage (may lead to runtime failures)
f64be97807f594934240311bd0e96bb\jetified-fingerprint-2.5.3\AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project&#39;s minSdk version to at least 23, or use tools:overrideLibrary=&quot;me.aflak.libraries&quot; to force usage (may lead to runtime failures)

here is he manifest for the jetified-fingerprint

&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
package=&quot;me.aflak.libraries&quot;
android:versionCode=&quot;37&quot;
android:versionName=&quot;2.5.3&quot;&gt;

&lt;uses-sdk
    android:minSdkVersion=&quot;23&quot;
    android:targetSdkVersion=&quot;27&quot; /&gt;

&lt;uses-permission android:name=&quot;android.permission.USE_FINGERPRINT&quot; /&gt;

</manifest>

答案1

得分: 2

你不能在最低的 SDK 版本高于你自己的最低 SDK 版本时使用库。Omar Aflak(https://github.com/OmarAflak/Fingerprint)在他的库中使用了 minSDK 23。你需要提高你的最低版本或者使用另一个库。

我刚刚在这篇文章中读到 https://jaxenter.de/fingerprint-sensor-in-android-das-muessen-entwickler-wissen-36481 (抱歉,这是德语),指纹支持是在 SDK 23(Marshmallow Android)中添加的。所以你甚至不需要支持更早的版本。

也许这可以帮助你进一步 https://stackoverflow.com/questions/6109980/run-app-with-higher-sdk-on-lower-sdk

英文:

You can't use a library with minimum Sdk version above your own minimum Sdk version. Omar Aflak (https://github.com/OmarAflak/Fingerprint) uses minSDK 23 in his library. You have to raise your minimum version or use another library.

I just read in this article https://jaxenter.de/fingerprint-sensor-in-android-das-muessen-entwickler-wissen-36481 (sorry, it's german) that fingerprint support was added in SDK 23 (Marshmallow Android). So you do not even need to support older versions.

Maybe this can help you further https://stackoverflow.com/questions/6109980/run-app-with-higher-sdk-on-lower-sdk

huangapple
  • 本文由 发表于 2020年10月23日 01:59:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/64488004.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定