修复 Play Store 构建包含 Wear OS 信号导致发布被拒#8
Merged
Conversation
added 2 commits
July 14, 2026 21:57
Play Store 要求 Wear OS 应用使用独立轨道发布,但 phone-playstore 构建中 仍包含来自 wear_plus、watch_connectivity 插件和 play-services-wearable 的 Wear OS 信号: - android.hardware.type.watch (uses-feature) - com.google.android.wearable (uses-library) - WearableListenerService - wearable app queries 在 AndroidManifest-playstore.xml 中添加 tools:node="remove" 显式移除所有 Wear OS 声明,确保 Play Store phone 构建不触发 Wear OS 检测。 同时在 CI 工作流中为 playstore 目标添加 AAB 构建,Play Store 要求 AAB 格式。
AAB 输出在 build/app/outputs/bundle/<flavor>Release/ 而非 flutter-apk/。
builds 仓库使用 --dart-define=PLAYSTORE=true 但不传 -Pplaystore=true, 导致 Gradle 未切换到 AndroidManifest-playstore.xml,Wear OS 信号未被移除。 解析 dart-defines 属性(base64 编码)检测 PLAYSTORE=true, 与 -Pplaystore=true 任一命中即激活 Play Store 配置。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitLab MR: !86
Original: https://gitlab.com/Openlyst/doudou/-/merge_requests/86
概述 Play Store 拒绝了 version code 4089568 的发布,要求 Wear OS 应用使用独立轨道。原因是 phone-playstore 构建中仍包含来自插件的 Wear OS 信号。 ## 根因 通过 bundletool 解析原始 AAB (
doudou-21.0.0-2026-07-15-playstore.aab) 发现以下 Wear OS 信号未被移除: -uses-feature: android.hardware.type.watch— 来自wear_plus插件 -uses-library: com.google.android.wearable— 来自play-services-wearable-queries: com.google.android.wearable.app— 来自watch_connectivity插件 -DoudouWearableListenerService— 来自 phone manifest 合并 之前的AndroidManifest-playstore.xml只移除了uses-feature,遗漏了其余信号。 ## 修复 在android/app/src/phone/AndroidManifest-playstore.xml中添加tools:node="remove"显式移除所有 Wear OS 声明: -uses-feature: android.hardware.type.watch-uses-library: com.google.android.wearable-queries: com.google.android.wearable.app/com.samsung.android.app.watchmanager-service: DoudouWearableListenerService同时在 CI 工作流中为 playstore 目标添加 AAB 构建(Play Store 要求 AAB 格式)。 ## 验证 本地构建 AAB 后用 bundletool 提取 APK 验证,manifest 中所有 Wear OS 信号已完全移除。 GitHub Actions 全平台构建通过 (run 29390900055): - ✓ Build android-phone-playstore (含 AAB) - ✓ Build android-tv-playstore (含 AAB) - ✓ 全部 9 个目标通过 ## Summary by CodeRabbit * New Features * Added Android App Bundle (AAB) outputs for Play Store phone and TV builds. * Included AAB files in nightly and tagged release packages. * Bug Fixes * Improved Play Store phone manifest handling by removing extra Wear OS/Wear-related declarations and services. * Build & Release Improvements * Updated Play Store build detection to work with both Gradle properties and Dart build-time flags, ensuring the correct Play Store-specific resources are used.