NativeScript / NativeScript/android

Determine a suitable default value for minSdkVersion

未关闭
#1,773 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

The minSdkVersion is currently set to 17 (Android-4 2012).

When building the app with a common plugin like @nativescript/background-http the build will fail.

Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 17 cannot be smaller than version 21 declared in library [net.gotev:uploadservice:4.7.0] /Users/ianbrindley/.gradle/caches/transforms-3/24fa1312ea1be6efbab27240facdcfb1/transformed/jetified-uploadservice-4.7.0/AndroidManifest.xml as the library might be using APIs not available in 17
        Suggestion: use a compatible library with a minSdk of at most 17,
                or increase this project's minSdk version to at least 21,
                or use tools:overrideLibrary="net.gotev.uploadservice" to force usage (may lead to runtime failures)

Instead I have to add additional configuration to gradle to get this plugin to work.

I suggest that the minSdkVersion is set to 21.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从定义默认 minSdkVersion 的 Android 构建配置开始,使用 @nativescript/background-http 重现 manifest-merger 失败。检查将默认值从 17 更改为 21 的兼容性影响,然后验证插件无需额外的 Gradle 配置即可构建成功。项目使用约定的默认值且报告的构建成功,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android
领域
build-system, mobile
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。