我正在尝试使用Android-datepicker-Library(net.simonvt.app)库项目显示日期选择器,其中使用了使用nineoldandroids-2.3.0.jar文件的Android-numberpicker-Library项目。所以问题是我能够在Mac OS上运行应用程序,但不能在Windows 8上运行相同的代码。应用程序强制停止显示由以下引起:java.lang.NoClassDefFoundError。我无法找到解决方案。请帮忙。
logcat显示如下。
05-27 13:18:00.503: E/AndroidRuntime(830): FATAL EXCEPTION: main
05-27 13:18:00.503: E/AndroidRuntime(830): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sample/com.sample.activity.v2.TimeBaseZomentActivity}: android.view.InflateException: Binary XML file line #97: Error inflating class net.simonvt.widget.DatePicker
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.os.Handler.dispatchMessage(Handler.java:99)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.os.Looper.loop(Looper.java:130)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Method.invokeNative(Native Method)
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Method.invoke(Method.java:507)
05-27 13:18:00.503: E/AndroidRuntime(830): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-27 13:18:00.503: E/AndroidRuntime(830): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-27 13:18:00.503: E/AndroidRuntime(830): at dalvik.system.NativeStart.main(Native Method)
05-27 13:18:00.503: E/AndroidRuntime(830): Caused by: android.view.InflateException: Binary XML file line #97: Error inflating class net.simonvt.widget.DatePicker
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-27 13:18:00.503: E/AndroidRuntime(830): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.Activity.setContentView(Activity.java:1657)
05-27 13:18:00.503: E/AndroidRuntime(830): at com.sample.activity.v2.TimeBaseZomentActivity.onCreate(TimeBaseZomentActivity.java:76)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-27 13:18:00.503: E/AndroidRuntime(830): ... 11 more
05-27 13:18:00.503: E/AndroidRuntime(830): Caused by: java.lang.reflect.InvocationTargetException
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Constructor.constructNative(Native Method)
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
05-27 13:18:00.503: E/AndroidRuntime(830): ... 22 more
05-27 13:18:00.503: E/AndroidRuntime(830): Caused by: android.view.InflateException: Binary XML file line #40: Error inflating class net.simonvt.widget.NumberPicker
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-27 13:18:00.503: E/AndroidRuntime(830): at net.simonvt.widget.DatePicker.<init>(DatePicker.java:174)
05-27 13:18:00.503: E/AndroidRuntime(830): at net.simonvt.widget.DatePicker.<init>(DatePicker.java:147)
05-27 13:18:00.503: E/AndroidRuntime(830): ... 25 more
05-27 13:18:00.503: E/AndroidRuntime(830): Caused by: java.lang.reflect.InvocationTargetException
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Constructor.constructNative(Native Method)
05-27 13:18:00.503: E/AndroidRuntime(830): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
05-27 13:18:00.503: E/AndroidRuntime(830): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
05-27 13:18:00.503: E/AndroidRuntime(830): ... 32 more
05-27 13:18:00.503: E/AndroidRuntime(830): Caused by: java.lang.NoClassDefFoundError: com.nineoldandroids.animation.ObjectAnimator
05-27 13:18:00.503: E/AndroidRuntime(830): at net.simonvt.widget.NumberPicker.<init>(NumberPicker.java:669)
05-27 13:18:00.503: E/AndroidRuntime(830): at net.simonvt.widget.NumberPicker.<init>(NumberPicker.java:532)
05-27 13:18:00.503: E/AndroidRuntime(830): ... 35 more