Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (12.7k points)
I'm attempting to export my Python content to an Android executable (.apk) with Python for Android.

http://python-for-android.readthedocs.org/en/latest/toolchain/#how-does-it-work

https://github.com/kivy/python-for-android/

I have followed all the means, yet I have an issue: the dist/default organizer made doesn't contain any build.py. It's vacant.

What's the issue? How would I settle it? Help, if you don't mind

1 Answer

0 votes
by (26.4k points)
edited by

In this way, fundamentally, you're utilizing buildozer and it's working at this point. Glance in the buildozer.spec record once more. There should be the lines: 

# (str) Application versioning (method 1)

version.regex = __version__ = '(.*)'

version.filename = %(source.dir)s/main.py

# (str) Application versioning (method 2)

# version = 1.2.0

what you need to do, I accept( in light of the fact that I needed to do this ), is transform them to this: 

# (str) Application versioning (method 1)

# version.regex = __version__ = '(.*)'

# version.filename = %(source.dir)s/main.py

# (str) Application versioning (method 2)

version = 1.2.0

see I have remarked out two lines at the top and uncommented the main concern. (I haven't tried evolving the '1.2.0' yet myself don't as well, know whether that has any kind of effect. It shouldn't.) The issue is by all accounts that buildozer searches for a line in your py document, __version__ = something, and there is a mistake when it doesn't discover it. I had a go at adding this line to my python, yet it actually didn't work. This change, nonetheless, accomplished work. 

Just try executing your build with the verbose on, so that you can exactly identify what causing any errors, example:

sudo buildozer --verbose android debug deploy run

Enroll the python training course, to gain more knowledge in python

Related questions

0 votes
1 answer
+2 votes
4 answers
0 votes
1 answer
asked Jan 31, 2021 in Python by laddulakshana (12.7k points)
0 votes
1 answer

Browse Categories

...