Incremental build issue when adding Android resource #9588
Closed
Description
opened on Dec 4, 2024
Android framework version
net9.0-android
Affected platform version
.NET 9.0.101
Description
Adding a new Android resource to a project causes the incremental build to error with:
Resources\layout\activity_two.xml error APT2126: file not found.
This error comes from the Aapt2Compile
task. It is looking for \obj\Debug\net9.0-android\res\layout\activity_two.xml
but that file doesn't exist. Presumably some previous incremental step is not running and copying it there?
Steps to Reproduce
dotnet new android
dotnet build -bl
copy Resources\layout\activity_main.xml Resources\layout\activity_two.xml
dotnet build -bl
Activity