Baseflow / Baseflow/XF-Material-Library

NoSuchFieldException in EntryRenderer

Open
#456 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
633
Forks
150
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

When building an Android app targetting API 29 or higher,` MaterialEntryRenderer` fails to get the `mCursorDrawableRes` field from `android.widget.TextView`, as it has been blacklisted.

https://github.com/Baseflow/XF-Material-Library/blob/fef56fb66de1ff7fc198745f200883f6ac489c20/XF.Material/Platforms/Android/Renderers/Internals/MaterialEntryRenderer.cs#L74

I guess it also break the cursor colour change, but I haven't tested that.

I found [this issue here](https://github.com/unoplatform/uno/issues/6240) with the exact same problem, and a proposed solution.

### Expected behavior

The code should not throw a `NoSuchFieldException` here.

### Reproduction steps

Create a project with a MaterialLabel, and the Android target API >= 29. Then run it in debug mode (I am using Rider). An exception should be caught by the debugger.

### Configuration

**Version:** 1.8.0

**Platform:**
- [ ] :iphone: iOS
- [X] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [X] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.