共用方式為


.NET for Android 錯誤/警告 APT2000

錯誤訊息APT2000範例

  • error APT2000 Cannot find the specified file
  • error APT2000: Resource entry resource_name is already defined.
  • error APT2000: No resource found that matches the given name (at 'resource_name' with value '@string/foo').
  • error APT2000: invalid resource directory name: "obj\Debug\dir with spaces" "dir with spaces".
  • warning APT2000: warn: removing resource com.companyname.example:drawable/foo without required default value.

Issue

此訊息表示 aapt2 (Android 資產打包工具)回報錯誤或警告。 aapt2 是 Android SDK 的一部分,並由 .NET for Android 內部使用,用來處理與編譯資源成二進位資產。

aapt2 報告的錯誤不在 .NET for Android 的控制範圍內,因此會使用一般錯誤碼 APT2000,來報告由 aapt2 提供的精確訊息。

解決方案

閱讀錯誤訊息並查看診斷日誌輸出通常能提供足夠資訊自行解決問題。 你可以上網搜尋錯誤訊息。 尋找針對 Java 基礎 Android 應用程式的解決方案也會有幫助。

想了解更多 aapt2 Android 資源,請參閱 Android 文件