toga
toga copied to clipboard
DateInput not working on Android 7.1.2
Describe the bug
The date_and_time example fails to run on android 7.1.2
Steps to reproduce
- Load
date_and_timeexample - Run
briefcase run android -u - Select either Android 7.1.2 physical device or emulator
- App crashes with following error: Device log output.txt
Expected behavior
Date input works as expected
Environment
- Operating System: Android 7.1.2, Built on Windows 11 23H2 (Build 22631.2861)
- Android devices: VT-7, emulator -
- Python version: Python 3.10.4
- Software versions:
- Briefcase: 0.3.16
- Toga: 0.4.1
Thanks for the report; unfortunately, I can't reproduce the problem locally with an Android 25 emulator (started with briefcase run android -d '{"avd": "beePhone25", "skin":"pixel_3a", "system_image": "system-images;android-25;default;arm64-v8a"})
I get part of the stack trace that you've shown:
Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
That part makes sense - OnUnhandledKeyEventListener was added in API 28. It appears to be be caused by the version of the AppCompat library that we're using.
However, this doesn't cause the rest of the crash (the OverflowError: timestamp out of range for platform time_t part).