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

Bitrise构建Android项目时sips命令找不到问题求助

Why does the sips command not work on Bitrise for Android builds?

The root cause here is straightforward: sips is a macOS-only command-line utility designed for image and icon manipulation. Bitrise's default build environment for Android projects uses Linux-based virtual machines (typically Ubuntu), and Linux systems don't include the sips tool at all—hence the "command not found" error you're seeing.

Your local setup works perfectly because you're running the script on a macOS machine, where sips comes pre-installed with the operating system.

Here are two solid solutions to fix this:

  • Switch to a macOS build machine on Bitrise
    If you want to keep using your existing sips script without modifications, you can configure your Bitrise workflow to use a macOS-based runner instead of Linux. Keep in mind that macOS build machines usually cost more in terms of build minutes and have higher resource overhead compared to Linux runners, but Android builds do work perfectly fine on macOS.

  • Replace sips with a cross-platform image tool
    A more cost-effective and future-proof approach is to swap out sips for a cross-platform alternative like ImageMagick, which supports Linux, macOS, and Windows. Here's how to set this up on Bitrise:

    1. Add a new "Script" step early in your workflow to install ImageMagick on the Linux runner:
      apt-get update && apt-get install -y imagemagick
      
    2. Rewrite the image resizing commands in your script to use ImageMagick's convert tool. For example:
      • Original sips command: sips -z 108 108 input.png --out output.png
      • Equivalent ImageMagick command: convert input.png -resize 108x108! output.png
        The ! flag ensures the image is forced to the exact dimensions (instead of scaling proportionally), matching the behavior of sips in this case.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.29 07:03:26