Add check for java reserved works in AndroidResource items #9537
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context #9461
Some users are seeing the following error from
aapt2
.This is because
import
is a java reserved word. Theaapt2
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.