You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firefox for Android Release构建失败求助:依赖解析错误

问题

按照Firefox for Android官方文档构建时,Debug构建可正常完成,但执行Release构建时出现如下错误:

Could not determine the dependencies of task ':fenix:lintVitalReportFenixRelease'.
> Could not resolve all dependencies for configuration ':fenix:lintChecks'.
   > Could not resolve project :mozilla-lint-rules.
     Required by:
         project :fenix
      > Unable to find a matching variant of project :mozilla-lint-rules:
          - No variants exist.

Windows系统下的构建步骤:

install https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
run C:\mozilla-build\start-shell.bat
cd C:/
mkdir mozilla-source
cd mozilla-source
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
python3 bootstrap.py --vcs=git (choose "3. GeckoView/Firefox for Android Artifact Mode")
add "ac_add_options --target=aarch64" to mozconfig
./mach build
./mach gradle clean fenix:assembleDebug //ok
./mach gradle clean fenix:assembleRelease //error

请问是否遗漏了必要的配置或步骤?

解决方法
  • 手动预构建lint规则模块。Artifact模式下部分本地依赖不会自动构建,先执行:

    ./mach gradle :mozilla-lint-rules:assemble
    

    完成后再运行Release构建命令。

  • 补充mozconfig的Release相关配置。在mozconfig中添加:

    ac_add_options --enable-release
    ac_add_options --disable-debug
    

    然后重新执行./mach build,再尝试Release构建。

  • 切换到完整构建模式。如果Artifact模式持续有依赖问题,重新运行bootstrap.py时选择非Artifact模式(选项1或2),完整构建GeckoView及所有依赖模块。

  • 检查Windows环境权限。确保以管理员身份启动Mozilla Build的start-shell.bat,避免路径或权限导致的依赖构建失败。

内容的提问来源于stack exchange,提问作者SantK

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 08:47:14