react-native-add-calendar-event icon indicating copy to clipboard operation
react-native-add-calendar-event copied to clipboard

Crashing on Android

Open julestruong opened this issue 3 years ago • 5 comments

When calling

  try {
      const eventConfig: AddCalendarEvent.CreateOptions = {
        title: 'test',
        startDate: dayjs().startOf('hour').toISOString(),
        endDate: dayjs().startOf('hour').add(1, 'hour').toISOString(),
        location: 'Rayon',
        // and other options
      }
      const result = await AddCalendarEvent.presentEventCreatingDialog(
        eventConfig,
      )
      if (result.action === 'SAVED') {
        const { calendarItemIdentifier, eventIdentifier } = result

        console.log(calendarItemIdentifier, eventIdentifier)
      } else {
        console.log('Canceled')
      }
    } catch (error) {
      console.log('WHAT')
      console.log(error)
    }

The error :

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.calendar/com.android.calendar.event.EditEventActivity}: java.lang.ClassNotFoundException: Didn't find class "com.android.calendar.event.EditEventActivity" on path: DexPathList[[zip file "/product/app/Calendar/Calendar.apk"],nativeLibraryDirectories=[/product/app/Calendar/lib/x86, /system/lib, /system_ext/lib]]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3365)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Version "react-native-add-calendar-event": "4.0.0", Simulator : Pixel 5

julestruong avatar Feb 14 '22 13:02 julestruong

running into the same issue. @julestruong did you find a way to resolve this? @vonovak any ideas?

catcher23 avatar Mar 09 '22 05:03 catcher23

did you find any solution ? @catcher23

grkemtneri avatar Dec 06 '22 14:12 grkemtneri

Can you try setting the library to v4.2.2? It works for me both on iOS and Android if I stick with this version.

The app crashes when I use v5.0.0. I didn't check native console, but I think it's the same root cause.

gamertense avatar Apr 03 '24 12:04 gamertense