Skip to content

ListPicker not working on API 29 #7785

@vmutafov

Description

@vmutafov

Hi,
It seems that the ListPicker is not working on API 29:

System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onCreateView failed
System.err: Error: java.lang.NoSuchFieldException: No field mSelectorWheelPaint in class Landroid/widget/NumberPicker; (declaration of 'android.widget.NumberPicker' appears in /system/framework/framework.jar!classes3.dex)
System.err:     java.lang.Class.getDeclaredField(Native Method)
System.err:     com.tns.Runtime.callJSMethodNative(Native Method)
System.err:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1209)
System.err:     com.tns.Runtime.callJSMethodImpl(Runtime.java:1096)
System.err:     com.tns.Runtime.callJSMethod(Runtime.java:1083)
System.err:     com.tns.Runtime.callJSMethod(Runtime.java:1063)
System.err:     com.tns.Runtime.callJSMethod(Runtime.java:1055)
System.err:     com.tns.FragmentClass.onCreateView(FragmentClass.java:53)

The issue seems to be because of using a Java field through reflection which is 'hidden' in the API 29 SDK and causes a NoSuchFieldException:

selectorWheelPaintField = picker.getClass().getDeclaredField("mSelectorWheelPaint");

We reproduced it in the Playground when dropping the list picker in the markup and deploying on API 29.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions