8***@qq.com
8***@qq.com
  • 发布:2024-12-08 22:30
  • 更新:2024-12-08 22:53
  • 阅读:26

uniappx 云基座打包,出现miniSdkVersion 问题

分类:uni-app x
错误解决方案

错误描述: Android minSdkVersion配置问题
解决方案: 项目中配置的Android minSdkVersion比三方库中声明的minSdkVersion低,参考文档:https://uniapp.dcloud.net.cn/tutorial/app-android-minsdkversion.html 修改minSdkVersion后重新提交打包
######################

[PackagePath]/app/AndroidManifest.xml Error:
uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.arthenica:ffmpeg-kit-full:6.0-2] /srv/.gradle/caches/transforms-3/077086bdfd9aa942ed0bc8d3bc79f243/transformed/jetified-ffmpeg-kit-full-6.0-2/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 24,
or use tools:overrideLibrary=\"com.arthenica.ffmpegkit\" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processReleaseMainManifest'.

    Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.arthenica:ffmpeg-kit-full:6.0-2] /srv/.gradle/caches/transforms-3/077086bdfd9aa942ed0bc8d3bc79f243/transformed/jetified-ffmpeg-kit-full-6.0-2/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 24,
    or use tools:overrideLibrary=\"com.arthenica.ffmpegkit\" to force usage (may lead to runtime failures)

  • Try:

    Run with --debug option to get more log output.
    Run with --scan to get full insights.
    Get more help at https://help.gradle.org.

但是我在 config.json 里面写了 24 没有效果,这还有哪儿可以填?

{
"minSdkVersion": 24,
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86",
"x86_64"
],
"dependencies": [{
"id": "com.arthenica:ffmpeg-kit-full",
"source": "implementation 'com.arthenica:ffmpeg-kit-full:6.0-2'"
}]
}

2024-12-08 22:30 负责人:无 分享
已邀请:
8***@qq.com

8***@qq.com (作者)

找到解决方案了,是 manifest.json 没有配置问题。

"app": {  
    "distribute": {  
        "android": {  
            "minSdkVersion": 24  
        }  
    }  
}

要回复问题请先登录注册