Replace kivy icon with custom icon

62 views
Skip to first unread message

Dan Moormann

unread,
Jul 24, 2023, 3:59:13 PM7/24/23
to Kivy users support
I have an icon 512x512 named crash.png
I'm trying to replace the default kivy icon on my android device.  

I've modified buildozer.spec 

# (str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png
#icon.filename = %(source.dir)s/crash.png
icon.filename = %(source.dir)s/resources/crash.png

I tried each of the commented-out lines and each time I get

FileNotFoundError: [Errno 2] No such file or directory: '/home/danm9/Crash/resources/crash.png'

I have a copy of crash.png in each directory (Crash, resources, data)

Any idea what I'm doing wrong???

Robert

unread,
Jul 24, 2023, 4:34:44 PM7/24/23
to Kivy users support
> Any idea what I'm doing wrong???
Following the instructions!

That 's' in there is bogus, and the %(source.dir) redundant

icon.filename = resources/crash.png

Dan Moormann

unread,
Jul 24, 2023, 5:52:05 PM7/24/23
to Kivy users support
Tried Robert's suggestion - same result 
FileNotFoundError: [Errno 2] No such file or directory: '/home/danm9/Crash/resources/crash.png'

Buildoser.spec
icon.filename = resources/crash.png

Robert

unread,
Jul 24, 2023, 7:07:00 PM7/24/23
to Kivy users support

Dan Moormann

unread,
Jul 24, 2023, 7:36:05 PM7/24/23
to Kivy users support
buildozer.spec located in  \\wsl.localhost\Ubuntu\home\danm9\Crash

copies of crash.png located in  \\wsl.localhost\Ubuntu\home\danm9\Crash
also
\\wsl.localhost\Ubuntu\home\danm9\Crash\resources
\\wsl.localhost\Ubuntu\home\danm9\Crash]data

Dan Moormann

unread,
Jul 24, 2023, 8:08:05 PM7/24/23
to Kivy users support
I just checked the location of crash.png and discovered that they were somehow named crash.png.png (possibly the problem).
I followed the info in the link Robert sent to buildozer appclean and the current build is taking forever like it did the first time (probably 3 hours, subsequent builds only took 5-7 minutes)

Dan Moormann

unread,
Jul 24, 2023, 9:31:28 PM7/24/23
to Kivy users support
Got it to work.  The app shows on the screen with the new icon, but when I press it, it momentarily shows the regular kivy logo.  Is that normal?

Thank you, Robert.  Your advice was spot on.  I just wish the documentation was clearer.

P.S.  It only took 2 hours to build.


Robert

unread,
Jul 24, 2023, 9:33:02 PM7/24/23
to Kivy users support
Your builds are very slow, so just checking because you say "\\wsl.localhost\Ubuntu" and nobody seems to use that style.
So I wonder if you are doing anything else unusual.

Your files are on the WSL partition (implied by above, but just checking they are really there) ?
Buildozer is run from the Ubuntu prompt?

Robert

unread,
Jul 24, 2023, 9:33:52 PM7/24/23
to Kivy users support
> it momentarily shows the regular kivy logo.  Is that normal?
no

Robert

unread,
Jul 24, 2023, 9:36:14 PM7/24/23
to Kivy users support
> I just wish the documentation was clearer.

Yes but the issue was whatever file manager renamed the file with an extra extension.
Reply all
Reply to author
Forward
0 new messages