问题
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