Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toga-android requires Android SDK 24 while it uses a class added in SDK 29 #2032

Closed
BishrGhalil opened this issue Jul 16, 2023 · 2 comments
Closed
Labels
bug A crash or error in behavior.

Comments

@BishrGhalil
Copy link

BishrGhalil commented Jul 16, 2023

Describe the bug

toga-android requires API Level 24 as it has been mentioned here

toga-android requires Android SDK 24 (Android 7 / Nougat) or newer.

However, I am getting the following error
E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: android.graphics.text.LineBreaker
whenever I try to run the beeware app on an Android device with API Level <29, After some search I found out that the LineBreaker class was introduced in API Level 29 as it's mentioned here

Additionally, how can I update the toga-android used in my app as soon as the bug is fixed?

Steps to reproduce

  1. Try to run a toga-app on Android <=9

Expected behavior

toga-android should not contain features from Android SDK 29 while it says it requires Android SDK 24. And apps should just run when there is no errors.

Screenshots

No response

Environment

  • Operating System: Windows
  • Python version: 3.10.6
  • Software versions:
    • Briefcase: 0.3.15
    • Toga: 0.3.1
    • ...

Logs


Additional context

No response

@BishrGhalil BishrGhalil added the bug A crash or error in behavior. label Jul 16, 2023
@mhsmith
Copy link
Member

mhsmith commented Jul 16, 2023

This has already been fixed in the development version. See #1878, and in future please search for existing issues before creating new ones.

The fix will be released with the next Toga version, probably in August or September. After that, you can update your app by changing the toga-android version in your pyproject.toml file.

@mhsmith
Copy link
Member

mhsmith commented Aug 7, 2024

To use the development version of Toga, edit your pyproject.toml file to replace the toga requirement with Git URLs for the core and backend packages. For example, on Android you would replace toga-android with the following:

"git+https://github.com/beeware/toga#subdirectory=core",
"git+https://github.com/beeware/toga#subdirectory=android",

Then run briefcase run android -ur.

On other platforms, replace "android" with the name of the Toga backend or Briefcase platform you're using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants