Closed edwit1971 closed 4 years ago
Just to summarize, I was told to use the KivyMD#257 issue to fix an icon bug fix. I did. and it worked great.
But that fix broke MatPlotLib from compiling. MatPlotLib will compile and work fine if you do not add the following 2 lines to your Buildozer.spec file: p4a.fork = edwit1971 p4a.branch = develop
if you instead prefer MatPlotLib to work, you just add hashtags in front of those two lines in the Buildozer.spec file and MatPlotLib will compile fine but your icons won't show inside your KivyMD menus or NavigationDrawer.
@edwit1971 Is https://github.com/HeaTTheatR/KivyMD/issues/257#issuecomment-665599554 solved your problem (cannot test)?
ArtemSBulgakov, this issue is not solved. If you use the #257 fix to make the icons appear, then you can NOT use MatPlotLib because it will not compile with Buildozer. But if you want MatPlotLib to compile with Buildozer you have to deactivate the #257 fix so the icons will NOT appear but at least buildozer will compile with MatPlotLib. So you get one or the other. Not both.
if you do NOT use the KivyMD #257 bug fix, meaning do NOT add the following two lines (or their equivalent) to your Buildozer.spec file: p4a.fork = edwit1971 p4a.branch = develop
and just compile normally, MatPlotLib will work. As for the ICONS you can have icons display, just do not use the pre-made icons in KivyMD. Go to https://material.io/resources/icons/?icon=info&style=baseline
and download the icons you want from here, put them in your project folder or even an images subfolder, and reference them inside your code with
'
Versions
Description
I'm pretty sure this is a Buildozer Bug. But since Buildozer uses Python-4-Android maybe it's a P4A Bug. And this Bug originates from a KivyMD Bug Fix so that's involved too.
There is a BUG in KivyMD #257 regarding icons showing on the PC when you run your App but after building with BUILDOZER the icons no longer show in the App when you run it. The solution was to go to the Python-4-Android Repository on Github and FORK it, etc. Then you now have two lines you have to add in your Buildozer.spec file:
(comment out) (str) python-for-android fork to use, defaults to upstream (kivy) p4a.fork = (your username)
(comment out) (str) python-for-android branch to use, defaults to master p4a.branch = develop
Here's the problem... When you do the above to fix the Icon-Bug-Problem in KivyMD, you now create a NEW Bug where MatPlotLib will not compile.
I have a sample project, 1 file, main.py, that is a Hello-World-MatPlotLib program in a Public Repository on GitHub: https://github.com/edwit1971/MatPlotLibHelloWorld
in the Buildozer.spec file if you do NOT comment these two lines out: p4a.fork = (your username) p4a.branch = develop
and type: buildozer android debug
you will get a MatPlotLib error and it won't compile an APK file.
if you comment these two lines out: (comment out) p4a.fork = (your username) (comment out) p4a.branch = develop
it will compile an APK file.
So you get one or the other but not both?
run: buildozer android debug https://github.com/edwit1971/MatPlotLibHelloWorld
buildozer.spec
Command:
Spec file:
Logs