react-native-add-calendar-event
react-native-add-calendar-event copied to clipboard
Crashing on Android
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
running into the same issue. @julestruong did you find a way to resolve this? @vonovak any ideas?
did you find any solution ? @catcher23
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.