question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android app crash when open the datepicker

See original GitHub issue

Describe the bug When open the screen contains the date picker in App in Android, the app will instantly crash and exit

Expected behavior The app should display the date picker without crashing

To Reproduce Add example code that reproduces the behavior.

        <ReactDatePicker
          mode={mode}
          date={tempMomentValue.toDate()}
          onDateChange={(date) => {
            setTempMomentValue(moment(date))
          }}/>

Smartphone (please complete the following information):

  • OS: Android
  • React Native version :0.61.5
  • react-native-date-picker version : 2.7.6

Error Log This is the error log in android studio

2020-02-19 11:19:20.605 11528-11528/com.billiapprn6 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.billiapprn6, PID: 11528 java.lang.NoClassDefFoundError: Failed resolution of: Lnet/time4j/android/ApplicationStarter; at com.henninghall.date_picker.DatePickerManager.createViewInstance(DatePickerManager.java:32) at com.henninghall.date_picker.DatePickerManager.createViewInstance(DatePickerManager.java:16) at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:139) at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:82) at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:269) at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:179) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:972) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:943) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:28) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:174) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947) at android.view.Choreographer.doCallbacks(Choreographer.java:761) at android.view.Choreographer.doFrame(Choreographer.java:693) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7050) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) Caused by: java.lang.ClassNotFoundException: Didn't find class "net.time4j.android.ApplicationStarter" on path: DexPathList[[zip file "/data/app/com.billiapprn6-jfs-cyvifH4UlZBlt6kj0Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.billiapprn6-jfs-cyvifH4UlZBlt6kj0Q==/lib/arm64, /data/app/com.billiapprn6-jfs-cyvifH4UlZBlt6kj0Q==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
virendravidyartheecommented, Apr 28, 2020

@henninghall @felixspitzer Thanks for your responses. Turns out, it was crashing due to an old gradle plugin version. Updated our gradle and it started working like a charm.

0reactions
henninghallcommented, Apr 28, 2020

Great to hear! Thanks for letting us know 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

DatePicker crashes on my device when clicked (with personal ...
When I enter my app and directly go to the DatePicker widget, the calendar is correctly displayed and as soon as I select...
Read more >
App crash when tapping DatePicker on Android 8.1 · Issue #342
The app crash when tapping the DatePicker on Android 8.1 version, it works fine on lower versions. Using: "react-native": "0.54.0", "react- ...
Read more >
App getting crash after selecting date in DatePicker
DatePicker is displaying but when I select a date in Android or scroll in iOS, change date is displayed but after that app...
Read more >
Materialdatepicker, App Crashes After Selecting The End Date
In my project I noticed that date-picker component keeps crashing on a specific dates. But after that I had created a new project...
Read more >
Pickers | Android Developers
Extending DialogFragment for a date picker; Showing the date picker ... if your app supports versions of Android older than 3.0—even as low ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found