Hello,
Because iOS and Windows platform do not have AndroidX.AppCompat.Widget.AppCompatEditText
class.
To fix this error, you can refer to following steps.
Firstly, you need to add conditional-compilation for android namespace in your MyEntryHandler.Android.cs
like following code.
#if ANDROID
using AndroidX.AppCompat.Widget;
using Android.Content;
#endif
Then, Configure filename-based multi-targeting, open your .csprj
file, add xml code from above document as children of the <Project>
node, this error will disappear.The build system will know: Don't compile C# code whose filename ends with .Android.cs, if you aren't building for Android.
Best Regards, Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.