Buildozer compiles a simple Android application, but does not work during packaging

This is the output of buildozer:

buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Apache ANT found at /root/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /root/.buildozer/android/platform/android-sdk-21
# Android NDK found at /root/.buildozer/android/platform/android-ndk-r9c
# Android packages already installed.
# Check application requirements
# Compile platform
# Distribution compiled.
# Build the application #1
# Package the application
Traceback (most recent call last):
  File "/bin/buildozer", line 5, in <module>
    run()
  File "/usr/lib/python2.7/site-packages/buildozer/__init__.py", line 1215, in run
        Buildozer().run_command(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/buildozer/__init__.py", line 842, in run_command
    self.target.run_commands(args)
  File "/usr/lib/python2.7/site-packages/buildozer/target.py", line 85, in run_commands
    func(args)
  File "/usr/lib/python2.7/site-packages/buildozer/target.py", line 97, in cmd_debug
    self.buildozer.build()
  File "/usr/lib/python2.7/site-packages/buildozer/__init__.py", line 178, in build
    self.target.build_package()
  File "/usr/lib/python2.7/site-packages/buildozer/targets/android.py", line 397, in build_package
    version = self.buildozer.get_version()
  File "/usr/lib/python2.7/site-packages/buildozer/__init__.py", line 554, in     get_version
    ' (looking for `{1}`)'.format(fn, regex))
    Exception: Unable to find capture version in ./main.py
 (looking for `__version__ = '(.*)'`)

I am trying to make a simple probability calculator that I developed. I cannot publish the code because I am going to publish it. However, I am ready to answer any questions that I need in order to make this work.

Judging by the findings of buildozer, I think it is looking for a line in main.py that I did not know what I needed. Unfortunately, I do not know what this line will look like. However, there is a line in buildozer.spec that says the following:

version.regex = __version__ = '(.*)'
version.filename = %(source.dir)s/main.py

The first line looks like the output line, and the second refers to the main.py file. Does anyone know what these lines mean? I'm new to buildozer, so I'm not quite sure what to do here. Thanks in advance for your help.

+4
2

buildozer main.py __version__ = 'something'. apk, .

main.py buildozer.spec. buildozer.spec.

+10

= '0,1' main.py, - .

0

Source: https://habr.com/ru/post/1531245/


All Articles