找不到方法getAccessibilityNodeProvider

时间:2013-10-08 21:59:10

标签: android warnings logcat numberpicker

我正在使用数字选择器simonvt库(https://github.com/SimonVT/android-numberpicker)。

我成功添加了库并且应用程序正常运行,但LogCat显示了这些警告:

Could not find method android.widget.LinearLayout.getAccessibilityNodeProvider, referenced from method net.simonvt.numberpicker.NumberPicker.getAccessibilityNodeProvider

完整的日志:

10-08 18:13:36.152: I/dalvikvm(489): Could not find method android.widget.LinearLayout.getAccessibilityNodeProvider, referenced from method net.simonvt.numberpicker.NumberPicker.getAccessibilityNodeProvider
10-08 18:13:36.152: W/dalvikvm(489): VFY: unable to resolve virtual method 5439: Landroid/widget/LinearLayout;.getAccessibilityNodeProvider ()Landroid/view/accessibility/AccessibilityNodeProvider;
10-08 18:13:36.162: D/dalvikvm(489): VFY: replacing opcode 0x6f at 0x0004
10-08 18:13:36.172: W/dalvikvm(489): Unable to resolve superclass of Lnet/simonvt/numberpicker/NumberPicker$AccessibilityNodeProviderImpl; (701)
10-08 18:13:36.182: W/dalvikvm(489): Link of class 'Lnet/simonvt/numberpicker/NumberPicker$AccessibilityNodeProviderImpl;' failed
10-08 18:13:36.192: W/dalvikvm(489): VFY: unable to find class referenced in signature (Landroid/view/accessibility/AccessibilityNodeProvider;)
10-08 18:13:36.192: D/dalvikvm(489): VFY: dead code 0x0007-0007 in Lnet/simonvt/numberpicker/NumberPicker;.getAccessibilityNodeProvider ()Landroid/view/accessibility/AccessibilityNodeProvider;
10-08 18:13:36.212: I/dalvikvm(489): Could not find method android.widget.LinearLayout.onInitializeAccessibilityEvent, referenced from method net.simonvt.numberpicker.NumberPicker.onInitializeAccessibilityEvent
10-08 18:13:36.212: W/dalvikvm(489): VFY: unable to resolve virtual method 5449: Landroid/widget/LinearLayout;.onInitializeAccessibilityEvent (Landroid/view/accessibility/AccessibilityEvent;)V
10-08 18:13:36.232: D/dalvikvm(489): VFY: replacing opcode 0x6f at 0x0000
10-08 18:13:36.232: D/dalvikvm(489): VFY: dead code 0x0003-0026 in Lnet/simonvt/numberpicker/NumberPicker;.onInitializeAccessibilityEvent (Landroid/view/accessibility/AccessibilityEvent;)V

示例项目也会显示这些警告!

谢谢

1 个答案:

答案 0 :(得分:0)

你在运行什么设备?根据文档,方法android.widget.LinearLayout.getAccessibilityNodeProvider在API级别16(Jelly Bean 4.1)中添加。所以它不适用于冰淇淋三明治或更低的设备。尝试使用模拟器查看是否有效。