toga icon indicating copy to clipboard operation
toga copied to clipboard

DateInput not working on Android 7.1.2

Open BoredManCodes opened this issue 2 years ago • 5 comments

Describe the bug

The date_and_time example fails to run on android 7.1.2

Steps to reproduce

  1. Load date_and_time example
  2. Run briefcase run android -u
  3. Select either Android 7.1.2 physical device or emulator
  4. 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 - image
  • Python version: Python 3.10.4
  • Software versions:
    • Briefcase: 0.3.16
    • Toga: 0.4.1

BoredManCodes avatar Jan 04 '24 06:01 BoredManCodes

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).

freakboy3742 avatar Jan 04 '24 23:01 freakboy3742