How to build chromium for Android

纵饮孤独 提交于 2019-12-25 07:38:24

问题


I am trying to build Chromium for Android by following the instructions here: Android Build Instructions. When I finally run "~/chromium/src$ ninja -C out/Release chrome_public_apk", I get this error: "ninja: error: unknown target 'chrome_public_apk'"

It seems that target is not built, in this link: Build Instructions (Android WebView), it says to run "build/gyp_chromium -DOS=android" before running the ninja command. However, I had followed the instructions for gn, what should I be calling in that case?

Thanks very much!


回答1:


Run gn args out/${name} to set up the build parameters for GN that'll build into out/${name} (e.g. out/ChromeRelease, don't use Release or Debug since they'll conflict with GYP). Here's some the parameters I use:

    target_os = "android"
    target_cpu = "arm"  # (default)
    is_debug = false  # (set to true for Debug build)
    symbol_level = 1 # 2 includes more symbols useful
                     # for debugging but increase binary size.
                     # 0 strips it down even more.
    is_component_build = true
    is_clang = true

Additionally, you'll want to add target_os = ["android"] to the .gclient file in your chromium directory and run gclient sync.



来源:https://stackoverflow.com/questions/36750948/how-to-build-chromium-for-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!