惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Simon Willison's Weblog
Simon Willison's Weblog
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
Last Week in AI
Last Week in AI
月光博客
月光博客
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
U
Unit 42
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
D
DataBreaches.Net
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
H
Hacker News: Front Page
Recent Announcements
Recent Announcements
C
CXSECURITY Database RSS Feed - CXSecurity.com
Latest news
Latest news
小众软件
小众软件
P
Palo Alto Networks Blog
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest
S
Secure Thoughts
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
O
OpenAI News
S
Securelist
云风的 BLOG
云风的 BLOG
H
Help Net Security
T
Troy Hunt's Blog

技术小黑屋

Vibe Coding 的安全风险与应对策略 - 技术小黑屋 Vibe Coding 最佳实践:10 个让开发效率提升 10 倍的关键技巧 一看就会,为 AI 编程 Agent 撸一个 MCP 服务 同样是 Sonnet 4.5,为何 CLI 工具差距这么大 定位 Android 权限声明来源 - 技术小黑屋 Android 升级 targetSDK 35 解决 namespace 问题 解决 Android Studio 关闭后终端 flutter run 进程自动结束的问题 使用 grep 查找关键字并显示上下文行 - 技术小黑屋 Android 开发中的三个常见构建错误及解决方案 - 技术小黑屋 使用 flock 解决 Git `unable to read tree` 问题 幂等性的劣化:从数学确定性到 AI 不确定性 - 技术小黑屋 Could not create task ':generateDebugRFile' 问题小记 Android 模拟器实现 hosts 修改 - 技术小黑屋 Vs Code 快速实现 重写 方法 Merge(Pull) Request 推荐的标签列表 - 技术小黑屋 中国特惠!多平台广告屏蔽专家 AdGuard 买断仅需 119 元起 使用 FVM 解决 flutter 3 无法添加 uploader 问题 git clone 使用代理,实现百倍加速 - 技术小黑屋 Flutter 处理 Error Setter not found AsciiChar 问题
AAPT2 aapt2-7.2.2-7984345-osx Daemon #5: Idle daemon unexpectedly exit. This should not happen 问题解决
androidyue · 2022-11-14 · via 技术小黑屋

CI 构建机,一直有概率出现构建失败的情况,查看了日志,得到了这样的相关错误信息

1
2
3
4
5
6
7
8
9
AAPT2 aapt2-7.2.2-7984345-osx Daemon #7: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #8: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #0: shutdown
15:32:49 [  +98 ms] AAPT2 aapt2-7.2.2-7984345-osx Daemon #6: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #4: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #3: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #5: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [        ] AAPT2 aapt2-7.2.2-7984345-osx Daemon #1: Idle daemon unexpectedly exit. This should not happen.
15:32:49 [ +499 ms] The message received from the daemon indicates that the daemon has disappeared.

解决方法

  • 看日志感觉是 Gradle 守护进程的问题
  • 想要既保持 Gralde 守护进程,又要解决这个问题,需要更多的时间
  • 比较简单的方式就是 禁用 Gradle 守护进程。

命令参数传递

  • 适用于能够直接使用gradlew
  • 也适用于不想全局应用配置的情况
1
./gradlew --no-daemon assembleXXX

gradle.properties

  • 适用于 无法直接配置 --no-daemon 的情况,比如 flutter 执行 Android 构建。
  • 适用于全局配置
1
2
## 修改这个文件 ~/.gradle/gradle.properties 如果没有,直接创建即可
org.gradle.daemon=false

注意: 这里配置完成,最好执行一下./gradlew --stop 确保不适用已有的守护进程。