Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for java reserved works in AndroidResource items #9537

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Nov 21, 2024

Context #9461

Some users are seeing the following error from aapt2.

APT2258 invalid symbol name 'com.companyname.mauiapp1:drawable/import'.
C:\Users*User\AppData\Local\Temp\2kevcthb.kih\com\companyname\mauiapp1\R.java*"

This is because import is a java reserved word. The aapt2 code generator is not taking that into account (like we do for C# designer.cs). As a result we get this error. Its not very helpful.
So lets introduce a new error APT0004 which will explicitly check for java keywords in resource filenames.
This will allow users to know why their build is failing.

Fix space before paren, use `$@"…"` strings so `\` doesn't need escaping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants