In app projects configured to use AAPT2, builds show incorrect file paths for AAPT2 errors caused by existing library projects built with AAPT that have Android resource elements that are now invalid with AAPT2 #3344
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
Milestone
Context: https://developercommunity.visualstudio.com/content/problem/635696/error-apt0000-inner-element-must-either-be-a-resou.html
Steps to reproduce
Build the library project from the test case:
Build the app project from the test case:
Test case: LibraryResourceAapt2ErrorPath.zip
The library project has
$(AndroidUseAapt2)
set tofalse
, while the app project has$(AndroidUseAapt2)
set totrue
.Expected behavior
I'm not sure if
resource_name_case_map
is missing expected information in this scenario or if it's normal that there won't be a mapping for this kind of resource in a prebuilt library. Maybe when the AAPT2 error comes from a prebuilt library project, the best file path to use would be the original location in the obj\ directory that AAPT2 prints in the original unparsed error message. So the errors would look something like:Actual behavior
The errors show an incorrect file path, making it look like they are coming from the app project, when they are actually coming from the library project:
Version information
Xamarin.Android SDK 9.5.0.26 (d16-3/f951e60)
Log file
msbuild.binlog.zip
The text was updated successfully, but these errors were encountered: