kidneyband
V2EX  ›  Android

如何在 Ubuntu 上编译出 macOS 上可以执行的 aapt2

  •  
  •   kidneyband · Aug 31, 2022 · 12437 views
    This topic created in 1375 days ago, the information mentioned may be changed or developed.

    根据谷歌官方文档 https://source.android.com/docs/setup/build/building

    我在我 Ubuntu(18.04)上下载了整个 android 源代码,文件夹叫 android-source 然后

    cd android-source

    source build/envsetup.sh

    make -j aapt2

    编译完成之后 在 android-source/out/host/... 中只有两个 aapt2 执行文件 一个是 windows 的 一个是 Linux 的

    请问我怎样才能编出一个在 macOS 上能执行的 aapt2 。

    2 replies    2022-08-31 20:21:54 +08:00
    novolunt
        1
    novolunt  
       Aug 31, 2022
    先安装虚拟机
    https://mac.getutm.app/support/
    然后部署 mac M1 芯片的虚拟机,在上面编译。
    SupperMary
        2
    SupperMary  
       Aug 31, 2022
    改 aapt2 的 Android.bp ,启用 mac os 的 target (需要它依赖的库也同时支持才可以)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2881 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 14:07 · PVG 22:07 · LAX 07:07 · JFK 10:07
    ♥ Do have faith in what you're doing.