soushin6
soushin6
  • 发布:2025-03-13 09:09
  • 更新:2025-03-13 09:09
  • 阅读:151

依赖的第三方minsdk太高了,在AndroidManifest.xml添加tools:overrideLibrary无效

分类:uts

在做uts插件的时候遇到个问题,依赖的第三方要求minSDK是28,但是项目降不下去,只能是tools:overrideLibrary,但是添加了之后自定义基座还是会报如下错误,添加了不生效。

自定义基座报错内容如下:
uses-sdk:minSdkVersion 21 cannot be smaller than version 28 declared in library [com.huawei.security:localauthentication:1.1.1] /home/[Name]/.gradle/caches/8.11.1/transforms/d9afa3441cc48216acf1d8682996f212/transformed/jetified-localauthentication-1.1.1/AndroidManifest.xml as the library might be using APIs not available in 21
Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 28,
or use tools:overrideLibrary=\"com.huawei.security.localauthentication\" to force usage (may lead to runtime failures)

错误详细日志:
https://app.liuyingyong.cn/build/errorLog/e9593890-ff52-11ef-a401-ef9882567f8f

已在项目的uni_modules/uts-plugin/utssdk/app-android/AndroidManifest.xml添加如下配置:

<?xml version="1.0" encoding="utf-8"?>  
<manifest  xmlns:android="http://schemas.android.com/apk/res/android"  
    xmlns:tools="http://schemas.android.com/tools"  
  package="uni.modules.localauthentication">  
  .....  
  <uses-sdk tools:overrideLibrary="com.huawei.security.localauthentication"/>  
</manifest>
2025-03-13 09:09 负责人:无 分享
已邀请:

要回复问题请先登录注册