Open DamianSuess opened 2 years ago
Updated the details to clearly state the cause of the error and how to reproduce it.
@jonathanpeppers thoughts?
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
The error message:
Error APT2259 '@xml=app_widget' is incompatible with attribute resource (attr) reference.
Came directly from the aapt2
tool from the Android SDK, we added this additional text from the .NET for Android workload:
This error is likely caused by an issue with the AndroidManifest.xml file or an Android manifest generation attribute in a source code file. SuessLabs.MokaWidget C:\xxxx\CoffeeWidget\source\Platforms\Android\AndroidManifest.xml 1
Can you give some more detail on what we should actually change here? I think we have to surface Android SDK errors exactly as they are given.
Description
Error,
APT2259
, does not provide the correct information as to where or what the error is that needs to be fixed. The error message incorrectly states that the issue is in theAndroidManifest.xml
file when it is really in a class.The actual issue was caused by a typo in my AppWidgetProvider class, "MokaWidget.cs", where I incorrectly used an equal sign, "
@xml=app_widget
" instead of a forward slash, "@xml/app_widget
".To reproduce this error, you can use the simple GitHub repo, https://github.com/DamianSuess/MokaWidget, and reinsert the typo. The repo's was created for a tutorial to showcase how to create Android Widgets using .NET MAUI.
Error List
Output - Build
Steps to Reproduce
Note, that the steps below pertain to Platforms\Android only, all other platforms are not being used.
AppWidgetProvider
inherited class which points toapp_widget.xml
file[MetaData("android.appwidget.provider", Resource = "@xml=app_widget")]
=
(equal) sign in@xml=app_widget
instead of,@xml/app_widget
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No response
Relevant log output
No response