Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchFieldException in EntryRenderer #456

Open
2 of 7 tasks
ganyuss opened this issue Jul 12, 2023 · 0 comments
Open
2 of 7 tasks

NoSuchFieldException in EntryRenderer #456

ganyuss opened this issue Jul 12, 2023 · 0 comments

Comments

@ganyuss
Copy link

ganyuss commented Jul 12, 2023

🐛 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.

var field = Java.Lang.Class.FromType(typeof(Android.Widget.TextView)).GetDeclaredField("mCursorDrawableRes");

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

I found this issue here 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:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant