chromium:ninja: build stopped: subcommand failed.

编译chromium autoninja -C out/Default system_webview_apk

出现错误

Traceback (most recent call last):
  File "../../build/android/gyp/compile_java.py", line 747, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/android/gyp/compile_java.py", line 743, in main
    output_paths=output_paths)
  File "/home/nuodiehan/chromium-depot/chromium-latest/src/build/android/gyp/util/md5_check.py", line 64, in CallAndWriteDepfileIfStale
    track_subpaths_allowlist=track_subpaths_allowlist)
  File "/home/nuodiehan/chromium-depot/chromium-latest/src/build/android/gyp/util/md5_check.py", line 155, in CallAndRecordIfStale
    function(*args)
  File "../../build/android/gyp/compile_java.py", line 738, in <lambda>
    lambda: _OnStaleMd5(options, javac_cmd, javac_args, java_files),
  File "../../build/android/gyp/compile_java.py", line 415, in _OnStaleMd5
    save_outputs=not options.enable_errorprone)
  File "../../build/android/gyp/compile_java.py", line 512, in _RunCompiler
    fail_on_output=options.warnings_as_errors)
  File "/home/nuodiehan/chromium-depot/chromium-latest/src/build/android/gyp/util/build_utils.py", line 287, in CheckOutput
    raise CalledProcessError(cwd, args, MSG.format(stream_string))
util.build_utils.CalledProcessError: Command failed: ( cd /home/nuodiehan/chromium-depot/chromium-latest/src/out/Default; ../../third_party/jdk/current/bin/javac -g -encoding UTF-8 -sourcepath : -source 1.8 -target 1.8 -proc:none -bootclasspath obj/third_party/android_sdk/android.ijar.jar:../../third_party/jdk/extras/java_8/jre/lib/rt.jar -d obj/media/base/android/display_java.javac.jar.staging/classes -classpath obj/third_party/android_deps/androidx_annotation_annotation.ijar.jar @obj/media/base/android/display_java.javac.jar.staging/files_list.txt )
Command failed because it wrote to stderr.
You can often set treat_warnings_as_errors=false to not treat output as failure (useful when developing locally).
[100/30872] ACTION //components/resour...d/toolchain/android:android_clang_x86)
ninja: build stopped: subcommand failed.

解决方案
在out/Default/args.gn 的编译文件中添加 fatal_linker_warnings=false

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
target_os = "android"
target_cpu = "x86"
is_debug = false 
system_webview_package_name = "com.android.webview"
fatal_linker_warnings = false
treat_warnings_as_errors=false

相关问题的链接:https://groups.google.com/a/chromium.org/g/chromium-dev/c/jnofouwbn0k/m/9lD-x-6LAgAJ

https://github.com/hanpfei/chromium-net/issues/1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

葫芦娃你好我是皮卡丘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值