code-troopers / android-betterpickers

[NO LONGER MAINTAINED] Android library for better Picker DialogFragments
2.67k stars 564 forks source link

CalendarDatePickerDialog crashing on Android 3.0 #95

Closed mousewithjetpack closed 9 years ago

mousewithjetpack commented 10 years ago

I noticed that the README indicates that this library requires ICS+ at compile time, but is it supposed to be compatible with older devices?

I just tried out the CalendarDatePickerDialog on an Android 3.0 emulator in Eclipse, and it crashed before it appeared.

Here is the LogCat:

06-13 18:31:22.834: E/AndroidRuntime(354): FATAL EXCEPTION: main
06-13 18:31:22.834: E/AndroidRuntime(354): java.lang.NoClassDefFoundError: android.view.accessibility.AccessibilityNodeInfo
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.Class.getDeclaredMethods(Native Method)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassCache.getDeclaredPublicMethods(ClassCache.java:153)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassCache.getMethodsRecursive(ClassCache.java:216)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassCache.findMethods(ClassCache.java:175)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassCache.getMethods(ClassCache.java:167)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.Class.getMethod(Class.java:976)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.PropertyValuesHolder.getPropertyFunction(PropertyValuesHolder.java:415)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.PropertyValuesHolder.setupSetterOrGetter(PropertyValuesHolder.java:468)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.PropertyValuesHolder.setupSetter(PropertyValuesHolder.java:486)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setupSetter(PropertyValuesHolder.java:1020)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.PropertyValuesHolder.setupSetterAndGetter(PropertyValuesHolder.java:525)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.ObjectAnimator.initAnimation(ObjectAnimator.java:410)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.ValueAnimator.startAnimation(ValueAnimator.java:1046)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.ValueAnimator.access$400(ValueAnimator.java:43)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:637)
06-13 18:31:22.834: E/AndroidRuntime(354):  at android.os.Handler.dispatchMessage(Handler.java:99)
06-13 18:31:22.834: E/AndroidRuntime(354):  at android.os.Looper.loop(Looper.java:126)
06-13 18:31:22.834: E/AndroidRuntime(354):  at android.app.ActivityThread.main(ActivityThread.java:3997)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.reflect.Method.invokeNative(Native Method)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.reflect.Method.invoke(Method.java:491)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
06-13 18:31:22.834: E/AndroidRuntime(354):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
06-13 18:31:22.834: E/AndroidRuntime(354):  at dalvik.system.NativeStart.main(Native Method)
06-13 18:31:22.834: E/AndroidRuntime(354): Caused by: java.lang.ClassNotFoundException: android.view.accessibility.AccessibilityNodeInfo in loader dalvik.system.PathClassLoader[/data/app/com.testapp.apk]
06-13 18:31:22.834: E/AndroidRuntime(354):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassLoader.loadClass(ClassLoader.java:548)
06-13 18:31:22.834: E/AndroidRuntime(354):  at java.lang.ClassLoader.loadClass(ClassLoader.java:508)
06-13 18:31:22.834: E/AndroidRuntime(354):  ... 23 more

It looks like this is the culprit:

java.lang.ClassNotFoundException: android.view.accessibility.AccessibilityNodeInfo

but I don't know how to resolve this.

By the way, I am using Eclipse with ADT, and the CalendarDatePickerDialog works fine when I run it on Android 4.0 or higher.

Any ideas?

mousewithjetpack commented 10 years ago

I found a temporary fix that I posted here:

https://github.com/JakeWharton/NineOldAndroids/issues/71

CedricGatay commented 9 years ago

Is this still relevant?

ct-bot commented 9 years ago

Hey there!

We're automatically closing this issue since the original poster (or another commenter) hasn't yet responded to the question or request made to them 14 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked.

Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

(Please note that this is an automated comment.)