kivy / buildozer

Generic Python packager for Android and iOS
https://buildozer.readthedocs.io
MIT License
1.69k stars 489 forks source link

toolchain.py: error: unrecognized arguments: --dir /home/razumov/Work/virtualenv/kivy/.buildozer/android/app #931

Open iarspider opened 5 years ago

iarspider commented 5 years ago

Versions

Description

Trying to build Kivi app with buildozer, build fails with

toolchain.py: error: unrecognized arguments: --dir /home/razumov/Work/virtualenv/kivy/.buildozer/android/app

buildozer.spec

Command:

buildozer android debug

Spec file:

[app]

# (str) Title of your application
title = OBSRemote

# (str) Package name
package.name = obsremote

# (str) Package domain (needed for android/ios packaging)
package.domain = com.iarazumov

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin

# (list) List of exclusions using pattern matching
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.1

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy,obs-websocket-py

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy

# (list) Garden requirements
#garden_requirements =

# (str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png

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

# (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)
orientation = portrait

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3

# Kivy version to use
osx.kivy_version = 1.11.1

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0

# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF

# (list) Permissions
android.permissions = INTERNET

# (int) Target Android API, should be as high as possible.
#android.api = 27

# (int) Minimum API your APK will support.
#android.minapi = 21

# (int) Android SDK version to use
#android.sdk = 20

# (str) Android NDK version to use
#android.ndk = 17c

# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21

# (bool) Use --private data storage (True) or --dir public storage (False)
android.private_storage = False

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (bool) If True, then automatically accept SDK license
# agreements. This is intended for automation only. If set to False,
# the default, you will be shown the license when first running
# buildozer.
# android.accept_sdk_license = False

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (list) Pattern to whitelist for the whole project
#android.whitelist =

# (str) Path to a custom whitelist file
#android.whitelist_src =

# (str) Path to a custom blacklist file
#android.blacklist_src =

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
#android.add_aars =

# (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap)
#android.gradle_dependencies =

# (list) Java classes to add as activities to the manifest.
#android.add_activites = com.example.ExampleActivity

# (str) python-for-android branch to use, defaults to master
#p4a.branch = stable

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (str) launchMode to set for the main activity
#android.manifest.launch_mode = standard

# (list) Android additional libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =

# (list) Android shared libraries which will be added to AndroidManifest.xml using <uses-library> tag
#android.uses_library =

# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

#
# Python for android (p4a) specific
#

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =

# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes =

# (str) Filename to the hook for p4a
#p4a.hook =

# (str) Bootstrap to use for android builds
# p4a.bootstrap = sdl2

# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =

#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
# Alternately, specify the URL and branch of a git checkout:
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master

# Another platform dependency: ios-deploy
# Uncomment to use a custom checkout
#ios.ios_deploy_dir = ../ios_deploy
# Or specify URL and branch
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s

[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#

#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

Logs

# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /home/razumov/.virtualenvs/kivy/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool
# Install platform
# Run '/home/razumov/.virtualenvs/kivy/bin/python -m pip install -q  \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517\' \'pytoml\' \'virtualenv\''
# Cwd None
# Apache ANT found at /home/razumov/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/razumov/.buildozer/android/platform/android-sdk
# Android NDK found at /home/razumov/.buildozer/android/platform/android-ndk-r17c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/home/razumov/.virtualenvs/kivy/bin/python -m pythonforandroid.toolchain create --dist_name=obsremote --bootstrap=sdl2 --requirements=python3,kivy,obs-websocket-py --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/python-for-android
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 27
[INFO]:    Available Android APIs are (27)
[INFO]:    Requested API target 27 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/razumov/.buildozer/android/platform/android-ndk-r17c
[INFO]:    Found NDK revision 17.2.4988734
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    Found virtualenv at /home/razumov/.virtualenvs/kivy/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         obsremote: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, six, pyjnius, android, kivy, obs-websocket-py), built for archs (armeabi-v7a)
[INFO]:    obsremote has compatible recipes, using this one
# Build the application #4
# Copy application source from /home/razumov/Work/virtualenv/kivy
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app
# Copy /home/razumov/Work/virtualenv/kivy/main.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/Dockerfile
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/setup.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/LICENSE
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/tests
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/tests/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/tests/test_buildozer.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/tests/scripts
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/tests/scripts/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/tests/scripts/test_client.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer.egg-info
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer.egg-info/PKG-INFO
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/build/lib/buildozer
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/sitecustomize.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/jsonstore.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/target.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/__main__.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/build/lib/buildozer/scripts
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/scripts/remote.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/scripts/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/scripts/client.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/build/lib/buildozer/libs
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/libs/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/libs/version.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/libs/_structures.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/build/lib/buildozer/targets
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/targets/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/targets/osx.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/targets/ios.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/build/lib/buildozer/targets/android.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/docs
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/docs/Makefile
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/docs/source
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/docs/source/conf.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/sitecustomize.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/jsonstore.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/target.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/__main__.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer/scripts
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/scripts/remote.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/scripts/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/scripts/client.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer/libs
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/libs/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/libs/version.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/libs/_structures.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer/targets
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/targets/__init__.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/targets/osx.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/targets/ios.py
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/targets/android.py
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer/tools/packer
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/tools/packer/Makefile
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/tools/packer/CHANGELOG
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/tools/packer/launch
# Create directory /home/razumov/Work/virtualenv/kivy/.buildozer/android/app/buildozer/buildozer/tools/packer/http
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/tools/packer/http/wallpaper.png
# Copy /home/razumov/Work/virtualenv/kivy/buildozer/buildozer/tools/packer/http/kivy-icon-96.png
# Package the application
# project.properties updated
# Gradle project detected, copy files /home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/build/dists/obsremote/src/main/java
# Run '/home/razumov/.virtualenvs/kivy/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name obsremote --name OBSRemote --version 0.1 --package com.iarazumov.obsremote --android_api 27 --minsdk 21 --ndk-api 21 --dir /home/razumov/Work/virtualenv/kivy/.buildozer/android/app --permission INTERNET --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/python-for-android
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Getting Android API version from user argument: 27
[INFO]:    Available Android APIs are (27)
[INFO]:    Requested API target 27 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/razumov/.buildozer/android/platform/android-ndk-r17c
[INFO]:    Found NDK revision 17.2.4988734
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    Found virtualenv at /home/razumov/.virtualenvs/kivy/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         obsremote: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, six, pyjnius, android, kivy, obs-websocket-py), built for archs (armeabi-v7a)
[INFO]:    obsremote has compatible recipes, using this one
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         obsremote: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, six, pyjnius, android, kivy, obs-websocket-py), built for archs (armeabi-v7a)
[INFO]:    obsremote has compatible recipes, using this one
[INFO]:    -> directory context /home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/build/dists/obsremote
usage: toolchain.py [-h] [--private PRIVATE] --package PACKAGE --name NAME
                    [--numeric-version NUMERIC_VERSION] --version VERSION
                    [--launcher] [--permission PERMISSIONS [PERMISSIONS ...]]
                    [--meta-data META_DATA] [--uses-library ANDROID_USED_LIBS]
                    [--icon ICON] [--service SERVICES] [--presplash PRESPLASH]
                    [--presplash-color PRESPLASH_COLOR] [--window]
                    [--orientation ORIENTATION] [--wakelock]
                    [--blacklist BLACKLIST] [--whitelist WHITELIST]
                    [--add-jar ADD_JAR] [--add-aar ADD_AAR] [--depend DEPENDS]
                    [--sdk SDK_VERSION] [--minsdk MIN_SDK_VERSION]
                    [--allow-minsdk-ndkapi-mismatch]
                    [--intent-filters INTENT_FILTERS]
                    [--with-billing BILLING_PUBKEY]
                    [--add-source EXTRA_SOURCE_DIRS]
                    [--try-system-python-compile] [--no-compile-pyo] [--sign]
                    [--add-activity ADD_ACTIVITY]
                    [--activity-launch-mode ACTIVITY_LAUNCH_MODE]
                    [--allow-backup ALLOW_BACKUP] [--no-optimize-python]
toolchain.py: error: unrecognized arguments: --dir /home/razumov/Work/virtualenv/kivy/.buildozer/android/app
# Command failed: /home/razumov/.virtualenvs/kivy/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name obsremote --name OBSRemote --version 0.1 --package com.iarazumov.obsremote --android_api 27 --minsdk 21 --ndk-api 21 --dir /home/razumov/Work/virtualenv/kivy/.buildozer/android/app --permission INTERNET --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/razumov/Work/virtualenv/kivy/.buildozer/android/platform/build" --ndk-api=21
# ENVIRONMENT:
#     GS_LIB = '/home/razumov/.fonts'
#     KDE_FULL_SESSION = 'true'
#     LD_LIBRARY_PATH = ':/home/razumov/instantclient_11_2'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     TERMINAL_EMULATOR = 'JetBrains-JediTerm'
#     LC_MEASUREMENT = 'C'
#     VIRTUALENVWRAPPER_WORKON_CD = '1'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     LC_PAPER = 'en_US.UTF-8'
#     LC_MONETARY = 'en_US.UTF-8'
#     VIRTUALENVWRAPPER_HOOK_DIR = '/home/razumov/.virtualenvs'
#     LANG = 'en_US.UTF-8'
#     DISPLAY = ':0'
#     ORACLE_HOME = '/home/razumov/instantclient_11_2'
#     OLDPWD = '/home/razumov/Work/virtualenv/kivy/buildozer'
#     WORKON_HOME = '/home/razumov/.virtualenvs'
#     JAVA_OPTS = '-XX:+IgnoreUnrecognizedVMOptions'
#     JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64/'
#     XDG_VTNR = '1'
#     PAM_KWALLET5_LOGIN = '/run/user/1000/kwallet5.socket'
#     SSH_AUTH_SOCK = '/tmp/ssh-8P0JjYAQPonY/agent.2792'
#     VIRTUAL_ENV = '/home/razumov/.virtualenvs/kivy'
#     MANDATORY_PATH = '/usr/share/gconf/plasma.mandatory.path'
#     S_COLORS = 'auto'
#     LC_NAME = 'en_US.UTF-8'
#     XDG_SESSION_ID = '3'
#     USER = 'razumov'
#     DESKTOP_SESSION = 'plasma'
#     DEFAULTS_PATH = '/usr/share/gconf/plasma.default.path'
#     PWD = '/home/razumov/Work/virtualenv/kivy'
#     HOME = '/home/razumov'
#     SSH_AGENT_PID = '2878'
#     XCURSOR_SIZE = '0'
#     QT_ACCESSIBILITY = '1'
#     LIBVIRT_DEFAULT_URI = 'qemu:///system'
#     XDG_SESSION_TYPE = 'x11'
#     EOS_MGM_URL = 'root://eosuser.cern.ch'
#     XDG_DATA_DIRS = '/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop'
#     XDG_SESSION_DESKTOP = 'KDE'
#     LC_ADDRESS = 'en_US.UTF-8'
#     LC_NUMERIC = 'en_US.UTF-8'
#     PROJECT_HOME = '/home/razumov/Work/virtualenv'
#     DESKTOP_STARTUP_ID = 'AsusX;1562162028;376386;2995_TIME24927916'
#     VIRTUALENVWRAPPER_SCRIPT = '/usr/local/bin/virtualenvwrapper.sh'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     XDG_SESSION_CLASS = 'user'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     XCURSOR_THEME = 'breeze_cursors'
#     XDG_CURRENT_DESKTOP = 'KDE'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     SHLVL = '1'
#     XDG_SEAT = 'seat0'
#     LANGUAGE = 'en_US'
#     LC_TELEPHONE = 'en_US.UTF-8'
#     LOGNAME = 'razumov'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     PAM_KWALLET_LOGIN = '/run/user/1000/kwallet.socket'
#     XAUTHORITY = '/home/razumov/.Xauthority'
#     VIRTUALENVWRAPPER_PROJECT_FILENAME = '.project'
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session1'
#     QT_AUTO_SCREEN_SCALE_FACTOR = '0'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings'
#     PATH = '/home/razumov/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/razumov/.virtualenvs/kivy/bin:/home/razumov/.local/share/umake/bin:/home/razumov/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/bin:/snap/bin'
#     LC_IDENTIFICATION = 'en_US.UTF-8'
#     KDE_SESSION_UID = '1000'
#     PS1 = ('(kivy) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ')
#     KDE_SESSION_VERSION = '5'
#     SESSION_MANAGER = 'local/AsusX:@/tmp/.ICE-unix/2970,unix/AsusX:/tmp/.ICE-unix/2970'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     LC_TIME = 'C'
#     _ = '/home/razumov/.virtualenvs/kivy/bin/buildozer'
#     PACKAGES_PATH = '/home/razumov/.buildozer/android/packages'
#     ANDROIDSDK = '/home/razumov/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/razumov/.buildozer/android/platform/android-ndk-r17c'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
nesergen commented 4 years ago

I have same problem. there are a lot of different warnings and errors in the logs that affect the assembly is not clear.

Short log with ERROR:

[INFO]:     NewJeans_py3_App: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy), built for archs (armeabi-v7a)
[INFO]:    NewJeans_py3_App has compatible recipes, using this one
[INFO]:    -> directory context /home/TERRA/PythonExp/kivy_exp/new_jeans_v5_py3/.buildozer/android/platform/build-armeabi-v7a/dists/NewJeans_py3_App
usage: toolchain.py [-h] [--private PRIVATE] --package PACKAGE --name NAME
                    [--numeric-version NUMERIC_VERSION] --version VERSION
                    [--launcher] [--permission PERMISSIONS [PERMISSIONS ...]]
                    [--meta-data META_DATA] [--uses-library ANDROID_USED_LIBS]
                    [--icon ICON] [--service SERVICES] [--presplash PRESPLASH]
                    [--presplash-color PRESPLASH_COLOR] [--window]
                    [--orientation ORIENTATION] [--wakelock]
                    [--blacklist BLACKLIST] [--whitelist WHITELIST]
                    [--add-jar ADD_JAR] [--add-aar ADD_AAR] [--depend DEPENDS]
                    [--sdk SDK_VERSION] [--minsdk MIN_SDK_VERSION]
                    [--allow-minsdk-ndkapi-mismatch]
                    [--intent-filters INTENT_FILTERS]
                    [--with-billing BILLING_PUBKEY]
                    [--add-source EXTRA_SOURCE_DIRS]
                    [--try-system-python-compile] [--no-compile-pyo] [--sign]
                    [--add-activity ADD_ACTIVITY]
                    [--activity-launch-mode ACTIVITY_LAUNCH_MODE]
                    [--allow-backup ALLOW_BACKUP] [--no-optimize-python]
toolchain.py: error: unrecognized arguments: --dir /home/TERRA/PythonExp/kivy_exp/new_jeans_v5_py3/.buildozer/android/app
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name NewJeans_py3_App --name NewJeans_py3 --version 5.1 --package org.new_jeans_xml.newjeans_py3_app --android_api 26 --minsdk 21 --ndk-api 21 --dir /home/TERRA/PythonExp/kivy_exp/new_jeans_v5_py3/.buildozer/android/app --permission WRITE_EXTERNAL_STORAGE --permission WAKE_LOCK --permission READ_EXTERNAL_STORAGE --permission ACCESS_CHECKIN_PROPERTIES --orientation portrait --wakelock --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/TERRA/PythonExp/kivy_exp/new_jeans_v5_py3/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
#     SHLVL = '1'
#     QT_STYLE_OVERRIDE = 'gtk'
#     PACKAGES_PATH = '/home/sergen/.buildozer/android/packages'
#     LANGUAGE = 'ru'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     ANDROIDSDK = '/home/sergen/.buildozer/android/platform/android-sdk'
#     GTK_MODULES = 'gail:atk-bridge'
#     OLDPWD = '/home/sergen'
#     XDG_VTNR = '7'
#     PATH = '/home/sergen/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/sergen/bin:/home/sergen/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     HOME = '/home/sergen'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     QT_ACCESSIBILITY = '1'
#     XDG_SESSION_TYPE = 'x11'
#     _ = '/usr/bin/python3'
#     PWD = '/home/TERRA/PythonExp/kivy_exp/new_jeans_v5_py3'
#     GDMSESSION = 'cinnamon'
#     CINNAMON_VERSION = '3.6.7'
#     GDM_LANG = 'ru'
#     XDG_GREETER_DATA_DIR = '/var/lib/lightdm-data/sergen'
#     VTE_VERSION = '4205'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     DISPLAY = ':0'
#     XDG_SESSION_DESKTOP = 'cinnamon'
#     GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     WINDOWID = '113246214'
#     QT_QPA_PLATFORMTHEME = 'qgnomeplatform'
#     USER = 'sergen'
#     XDG_SEAT = 'seat0'
#     DESKTOP_SESSION = 'cinnamon'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-cinnamon:/etc/xdg'
#     GJS_DEBUG_OUTPUT = 'stderr'
#     XDG_SESSION_ID = 'c1'
#     ANDROIDMINAPI = '21'
#     QT_LINUX_ACCESSIBILITY_ALWAYS_ON = '1'
#     DEFAULTS_PATH = '/usr/share/gconf/cinnamon.default.path'
#     XAUTHORITY = '/home/sergen/.Xauthority'
#     MANDATORY_PATH = '/usr/share/gconf/cinnamon.mandatory.path'
#     SHELL = '/bin/bash'
#     LANG = 'ru_RU.UTF-8'
#     ANDROIDNDK = '/home/TERRA/Android/android-ndk-r17c'
#     TERM = 'xterm-256color'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:abstract=/tmp/dbus-Zqa7WkO1hF,guid=50a509bd1cec7cf956bfebfc5d8ca0cf'
#     SESSION_MANAGER = 'local/sergen-pc:@/tmp/.ICE-unix/1268,unix/sergen-pc:/tmp/.ICE-unix/1268'
#     LOGNAME = 'sergen'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     GTK_OVERLAY_SCROLLING = '1'
#     ANDROIDAPI = '26'
#     XDG_DATA_DIRS = '/home/sergen/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share/:/usr/share/cinnamon:/usr/share/gnome:/home/sergen/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     XDG_CURRENT_DESKTOP = 'X-Cinnamon'
#     SSH_AGENT_PID = '1400'
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Full log from terminal: log.txt

AndreMiras commented 4 years ago

Interesting, could you try with latest (master) buildozer version?

pip3 install --user --upgrade https://github.com/kivy/buildozer/archive/e58ad28.zip
nesergen commented 4 years ago

@AndreMiras No changes...

log2.txt

AndreMiras commented 4 years ago

Thanks for sharing the complete log. So yes it seems to come from the android.private_storage = False option on your buildozer.spec. Try without, but yes definitely that looks like a bug. Edit: After investigating, it seems like it was an option for the pygame bootstrap only and it was removed in https://github.com/kivy/python-for-android/pull/1670/files#diff-ab310fe0b339f970e424651f3a103a06L407 I've never played with it, but probably @inclement knows more it. Until then try to use android.private_storage = True and let us know if that fixes it

nesergen commented 4 years ago

@AndreMiras Excellent !!! Applet have been compiled to the end ! And it works !

phseiff commented 4 years ago

I have the same problem and I'd really like to find a way to fix it, as using private storage causes the storage to be overwritten every time the app is updated, which would make it really difficult for me to provide regular updates for my app without having the users storage overwritten every time they update. Is there any way to use buildozer with the old version of the pygame bootstrap, or to use an older version of buildozer (though I guess buildozer does not come with the bootstrap, but installs it after being run for the first time...?)

The --ouya-category and --ouya-icon option also seem to be broken, so using anything related in buildozer.spec is also not possible...

Couldn't I just replace pythonforandroid in my installation of buildozer with an older version?

inclement commented 4 years ago

The issue here is not the use of private storage, the same mechanism would overwrite the app folder if it was installed somewhere else.

If you want files to not be overwritten during updates, have your app write them somewhere else. Although not well documented, you can use the directory one level above the default working directory. You can also use your app's special area in the external storage directory, whose filepath you can query using pyjnius (or possibly kivy has an api to query it now).

On 29/01/2020 16:12, phseiff wrote:

I have the same problem and I'd really like to find a way to fix it, as using private storage causes the storage to be overwritten every time the app is updted, which would make it really difficult for me to provide regular updates for my app withou having the users storage overwritten every time they update. Is there any way to use buildozer with the old version of the pygame bootstrap, or to use an older version of buildozer (though I guess buildozer does not come with the bootstrap, but installs it after being run for the first time...?)

The --ouya-category and --ouya-icon option also seem to be broken, so using anything related in buildozer.spec is also not possible...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kivy/buildozer/issues/931?email_source=notifications&email_token=AAJVBGZQHGM4GLBDS7QZDZLRAGTGJA5CNFSM4H5GXGQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKHYY5Y#issuecomment-579832951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVBGZLSI4ZZTCUTBYTWMLRAGTGJANCNFSM4H5GXGQQ.

phseiff commented 4 years ago

Thanks, that's good to know! I didnt assume using the directory one level above the default working directory would work the same way it would work on any other system, but it's definitely a relieve to hear!

vilgacx commented 2 years ago

Can anyone Help me with this error?

toolchain.py: error: unrecognized arguments: --port=8080

misl6 commented 2 years ago

Can anyone Help me with this error?

toolchain.py: error: unrecognized arguments: --port=8080

Looks like a different issue. Can you please open a separate one by completing the whole bug report?

vilgacx commented 2 years ago

Can anyone Help me with this error? toolchain.py: error: unrecognized arguments: --port=8080

Looks like a different issue. Can you please open a separate one by completing the whole bug report?

Okay

vilgacx commented 2 years ago

Can anyone Help me with this error? toolchain.py: error: unrecognized arguments: --port=8080

Looks like a different issue. Can you please open a separate one by completing the whole bug report?

Separate one:

https://github.com/kivy/buildozer/issues/1358#issue-984945120

Julian-O commented 9 months ago

TL;DR: Setting android.private_storage = False causes a compilation error.

It seems that should not be an option that is offered any more, as it is no longer useful.

Low priority.