-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
[Android] ModuleNotFoundError: No module named 'androidx' #1693
Comments
After upgrading Briefcase, it can be necessary to run |
I delete and re-clone my repo before packaging every time, so I think this does not relate to the previous cache. |
I'm not sure which repo you're referring to - but the only way I'm aware that this issue could manifest is if:
If you're certain that you're doing all these things, please provide the log file as requested and we can investigate further. |
I'm sure that I've properly done the steps before packaging. With the dependencies suggested in the original warning, the APP will not crash:
Yet with these, the APP will crash:
|
So - reading this more closely... there's no bug here. When you updated your project, you were told to add:
to your project. You have then added:
which... isn't what you were told to add. As a result, your app doesn't work. Based on your most recent post - if you do what the warning message asked you to do... it works. So - there's no bug here. The underlying problem here is that The logcat extract you've provided doesn't include any of the Python logs, and Briefcase can't capture Android's adb console output, so the log files you've provided in your most recent post don't show this - but I'll bet that if you look at the full error generated by Python when you run the app with Briefcase, you'll have a stack trace that indicates the problem is on line 9 of toga_android/widgets/detailedlist.py. I'm guessing you got to this position by generating a clean Briefcase project, noticing that the "SwipeRrefreshLayout" was listed as "needed by DetailedList", and omitted it as your app doesn't use DetailedList. As of Toga 0.4.2, you need to have the SwipeRefreshLayout library in your app, even if you're not using DetailedList. You'll note that in a fresh project, the component isn't commented out - unlike other optional libraries (like the WebView libraries on Linux projects). The "SwipeRefreshLayout" requirement is is a requirement that could be relaxed - I've logged beeware/toga#2454 to describe the change that is required - but until a fix for that is released, you'll need to include SwipeRefreshLayout in your app's gradle dependencies. |
Is there a step in the workflow We / or I could add a source analysis, and warn the developer in case "DetailedList(" is used in the code, while the proper extension is not defined in the TOML file?
|
This has already been done in the current version of Toga: beeware/toga#2595.
I agree: we discussed this recently at #1845 (comment), and I'm still inclined towards including everything that's needed by Toga. 24.1 MB vs 24.6 MB is not a significant difference. At the very least we should include SwipeRefreshLayout, because DetailedList will be much more commonly used than MapView.
Re-running |
Describe the bug
After updating briefcase to 0.3.17 from 0.3.16,
briefcase package android -p apk
will show this warning:But when I add the dependencies to my pyproject.toml like this, my APP will crash:
Related logcat:
Steps to reproduce
Expected behavior
The APP will run normally.
Screenshots
No response
Environment
Logs
Full logcat:
Additional context
No response
The text was updated successfully, but these errors were encountered: