pythonandroid-emulatorbeeware

Icons not found by briefcase/android-emulator


I am building an app for android and iOS using beeware. When running the android emulator through briefcase, my icons are not included. I get the warnings:

I/python.stdout: WARNING: Can't find icon view_white; falling back to default icon
I/python.stdout: WARNING: Can't find icon add_white; falling back to default icon
I/python.stdout: WARNING: Can't find icon info_white; falling back to default icon

While continuously updating, building and running the emulator, I have done the following to address the problem:

  1. Double checked the icon references in the toga code (correct case and no file extensions etc.)

  2. Made it so that the icons are included in the APK's drawable folder by the system when completing the android build

  3. Inspected the adb logcat (to no avail)

How can I make the android emulator find the icons?


Solution

  • Toga doesn't use the APK's drawable folder to load icons. Icons should be placed in your Python source code directory, and loaded, as the documentation says, by passing a filename "relative to the module that defines your Toga application class".