arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.08640cs.SEcs.AI
收藏

自动化Android构建修复:通过领域特定工具弥合LLM代理中的推理-执行差距

Automating Android Build Repair: Bridging the Reasoning-Execution Gap in LLM Agents with Domain-Specific Tools

University of California, Davis(加州大学戴维斯分校);CodeDroid LLC(CodeDroid有限责任公司)

Ha Min Son, Huan Ren, Xin Liu, Zhe Zhao

AI总结:

本文提出AndroidBuildBench基准和GradleFixer工具,通过领域特定抽象提升LLM修复Android构建错误的效率,解决LLM在低层执行中的不足。

摘要:

Android是最大的移动平台,但自动构建应用仍是一个实际挑战。尽管大型语言模型(LLMs)在代码修复中表现出潜力,但其在修复Android构建错误方面的应用仍被忽视。为此,我们首先引入AndroidBuildBench,一个包含1,019个构建失败的基准,这些失败来自43个开源Android项目的提交历史。每个问题都配对了一个后续提交验证的解决方案,确保修复是可行的。其次,我们提出了GradleFixer,一个带有领域特定工具的LLM代理,用于检查和操作Gradle构建环境。GradleFixer在解决率(pass@1)上达到81.4%,显著优于依赖通用shell的最新编码代理。GradleFixer的成功表明,尽管LLMs具有解决这些失败的高层知识,但它们在使用通用shell时难以将这种知识转化为有效的低层操作。我们展示了通过我们称为Tool Bridging的策略的有效性,该策略用领域感知的抽象替代通用shell命令。我们假设这种方法通过两种机制起作用:1)它以API-like格式提供工具,LLMs更可靠地使用;2)它将操作空间限制在相关操作上。这种方法弥合了模型高层推理和有效低层执行之间的差距。

英文摘要:

Android is the largest mobile platform, yet automatically building applications remains a practical challenge. While Large Language Models (LLMs) show promise for code repair, their use for fixing Android build errors remains underexplored. To address this gap, we first introduce AndroidBuildBench, a benchmark of 1,019 build failures curated from the commit histories of 43 open-source Android projects. Each problem is paired with a verified solution from a subsequent commit, ensuring that fixes are feasible. Second, we propose GradleFixer, an LLM agent with domain-specific tools for inspecting and manipulating the Gradle build environment. GradleFixer achieves a resolve rate of 81.4% (pass@1), significantly outperforming a state-of-the-art coding agent that relies on a general-purpose shell. GradleFixer's success suggests that while LLMs possess the high-level knowledge to solve these failures, they struggle to translate this knowledge into effective low-level actions using a general-purpose shell. We demonstrate the effectiveness of a strategy we term Tool Bridging, which replaces general-purpose shell commands with domain-aware abstractions. We hypothesize this approach works through two mechanisms: 1) it provides tools in an API-like format that LLMs use more reliably, and 2) it constrains the action space to relevant operations. This approach bridges the gap between the model's high-level reasoning and effective low-level execution.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑