Sdílet prostřednictvím


.NET for Android error APT2265

Problém

Nástroj aapt2 nemůže vyřešit jeden ze souborů, které mu byly předány. This is generally caused by non-ASCII characters in the project name or the path to the project.

Řešení

The best way to avoid this is to ensure that your project does not contain non-ASCII characters. Pokud například vytvoříte všechny projekty ve složkách, jako je například

C:\Users\shëlly\Visual Studio 2022\Android\MyProjects\Com.SomeReallyLongCompanyName.MyBrillantApplication\MyBrilliantApplicaiton.Android\

you may well encounter problems with not only aapt2 but also Ahead of Time compilation. Keeping your project names and folder structures short, concise and ASCII will help work around these issues. Místo výše uvedeného byste například mohli použít

C:\Work\Android\MyBrilliantApp

Which is much shorter, contains no non-ASCII characters and much less likely to encounter issues.