Java.Lang.NoSuchFieldException when targeting API Level 28
bpelotto opened this issue · 8 comments
Bug
- Version Number of Control: 1.1.3
- Device Tested On: Pixel 2 XL
- Simulator Tested On: N/A
Affects
- iOS
- Android
Expected Behavior
Controls Initialize/Work Properly
Actual Behavior
Java.Lang.NoSuchFieldException is thrown.
Steps to reproduce the Behavior
Create new Xamarin Cross Platform .net Standard Project.
Update Initial Nuget Packages to Latest Version (Picture Attached)
Install XFX Controls 1.1.3
Set Target API Level to 28 (Android 9.0 Pie)
Create XFX Entry
Launch app
I am getting this too. I have yet to have any success solving it. Any ideas on what is going on? My only alternative it to ditch the package all together.
Here is a good summation of the problem: https://stackoverflow.com/questions/35683379/programmatically-set-textinputlayout-hint-text-color-and-floating-label-color
See the last comment on the first answer
I think I have fixed this by creating a wrapper control in my xamarin.forms project and a renderer that inherits from XfxEntryRendererDroid.
The control looks like this:
public class BizsXfxEntry : XfxEntry
{
public BizsXfxEntry() {
}
}
and my renderer is here:
https://gist.github.com/mrbelk/2e172d4094b8b612b9ba7c3530a742ee
@mrbelk Thanks, your wrapper worked for me
I merged the PR last week, is it still an issue in 1.2.1?
@ChaseFlorell updating fixed my issue :) thanks, I missed that the PR was completed. Thanks!
@vyfster Thanks for the writing the fix and doing a PR. @ChaseFlorell Thanks for staying up to date with this project and merging the PR in/doing a NuGet release!