範例訊息
error APT0001: Unknown option `--ignore-assets`. Please check `$(AndroidAapt2CompileExtraArgs)` and `$(AndroidAapt2LinkExtraArgs)` to see if they include any `aapt` command line arguments that are no longer valid for `aapt2` and ensure that all other arguments are valid for `aapt2`.
問題
新的 Android aapt2 資源工具有與舊 aapt 工具不同的命令列參數。 這些通常彼此不相容。
解決方法
如果你收到這個錯誤,請檢查以下欄位提供的數值。
<AndroidAapt2LinkExtraArgs/>
<AndroidAapt2CompileExtraArgs>
對aapt2是有效的。 你可以使用 aapt2 compile 和 aapt2 link 來查看有效論證清單。