Closed athoskenew closed 5 years ago
In your buildozer.spec
use p4a master branch via:
p4a.branch = master
I made the change in buildozer.spec but the problem persists
To make sure you're up to date:
rm .buildozer/android/platform/python-for-android*
buildozer android update
Still has not resolved the bug, the same error still appears. I do not know if it's just me. I checked my p4a and could not find something unusual, it's strange because apparently all dependencies are correct
@athoskenew you might also need to remove /home/dev/Modelos/testea/.buildozer/android/platform/build/dists/myapp
such that your dist is regenerated from the fresh files of your updated p4a. It probably still has the old build.py
lying around put in there by your previous older p4a which doesn't know about --ndk-api
yet
Hello, I tried to update my p4a the way that spoke, but for some reason it did not work and the old version was still there instead of the new one. So I manually downloaded the updated p4a and added it to the corresponding folders. This apparently worked, the toolchain.py error did not appear any more. But another error started to appear, I researched it and it had already happened with other people, but in VM because of a shared folder error, which is not my case. For the past two days I've been trying to fix the new bug, but I could not.
[app]
# (str) Title of your application
title = My Application
# (str) Package name
package.name = myapp
# (str) Package domain (needed for android/ios packaging)
package.domain = org.test
# (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 = python2,kivy
# (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.9.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) Android API to use
#android.api = 19
# (int) Minimum API required. You will need to set the android.ndk.api to be as low as this value.
#android.minapi = 9
# (int) Android SDK version to use
#android.sdk = 20
# (str) Android NDK version to use
#android.ndk = 9c
# (int) Android NDK API to use (optional). This is the minimum API your app will support.
#android.ndk_api = 19
# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
# (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
# (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 stable
#p4a.branch = master
# (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 =
# (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
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
# (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
buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Programa de gerenciamento de pacotes Debian 'dpkg' versão 1.19.0.5 (amd64).
Isto é software livre; veja a GNU General Public License versão 2 ou
posterior para condições de cópia. Não existe NENHUMA garantia.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /home/dev/.local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool
# Install platform
# Run '/usr/bin/python -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\''
# Cwd None
# Apache ANT found at /home/dev/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/dev/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/dev/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python2,kivy --ndk-api 9 --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/dev/Modelos/testea/.buildozer/android/platform/build"'
# Cwd /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 19
[INFO]: Available Android APIs are (19)
[INFO]: Requested API target 19 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /home/dev/.buildozer/android/platform/android-ndk-r9c
[INFO]: Got NDK version from $ANDROIDNDKVER: r9c
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]: Using Google NDK r9c
[INFO]: Found virtualenv at /usr/local/bin/virtualenv
[INFO]: ccache is missing, the build will not be optimized in the future.
[INFO]: Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]: Picking the latest gcc toolchain, here 4.8
[INFO]: No existing dists meet the given requirements!
[INFO]: No dist exists that meets your requirements, so one will be built.
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import join, exists
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import Recipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.python import GuestPythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.logger import shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/hostpython2/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.python import HostPythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import CythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import current_directory, shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import exists, join, basename
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import glob
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import CythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import shprint, current_directory, info
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.patching import will_build
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import join
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/six/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import PythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import TargetPythonRecipe, Recipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import shprint, current_directory, info
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.patching import (is_darwin, is_api_gt,
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from multiprocessing import cpu_count
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:6: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import exists, join, realpath
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:7: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os import walk
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:8: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import glob
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python2legacy/__init__.py:9: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.python import GuestPythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import Recipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import TargetPythonRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.logger import info, error
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.util import ensure_dir, temp_directory
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:6: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import exists, join
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/python3crystax/__init__.py:7: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/genericndkbuild/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/genericndkbuild/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import current_directory, shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/genericndkbuild/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import current_directory, shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2_image/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2_image/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.patching import is_arch
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2_mixer/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2_ttf/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import current_directory, info, shprint
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import exists, join
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame_bootstrap_components/__init__.py:1: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import BootstrapNDKRecipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame_bootstrap_components/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.toolchain import current_directory, shprint, info
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame_bootstrap_components/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import exists, join
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame_bootstrap_components/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame_bootstrap_components/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import glob
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:2: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.recipe import Recipe
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:3: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.util import current_directory, ensure_dir
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:4: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from pythonforandroid.logger import debug, shprint, info, warning
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:5: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
from os.path import join
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:6: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import sh
/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pygame/__init__.py:7: RuntimeWarning: Parent module 'pythonforandroid.recipes' not found while handling absolute import
import glob
[INFO]: Found a single valid recipe set: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]: The selected bootstrap is sdl2
[INFO]: # Creating dist with sdl2 bootstrap
[INFO]: Dist will have name myapp and recipes (python2, kivy)
[INFO]: Dist will also contain modules () installed from pip
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/bootstrap_builds/sdl2
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]: # Downloading recipes
[INFO]: Downloading hostpython2
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 58 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/hostpython2
[INFO]: -> running basename https://www.python.org...(and 36 more)
[INFO]: hostpython2 download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading sdl2_image
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 57 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/sdl2_image
[INFO]: -> running basename https://www.libsdl.or...(and 52 more)
[INFO]: sdl2_image download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading sdl2_mixer
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 57 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]: -> running basename https://www.libsdl.or...(and 52 more)
[INFO]: sdl2_mixer download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading sdl2_ttf
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 55 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]: -> running basename https://www.libsdl.org...(and 48 more)
[INFO]: sdl2_ttf download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading python2
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 54 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/python2
[INFO]: -> running basename https://www.python.org...(and 36 more)
[INFO]: python2 download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading sdl2
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 51 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/sdl2
[INFO]: -> running basename https://www.libsdl.org...(and 26 more)
[INFO]: sdl2 download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading six
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 50 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/six
[INFO]: -> running basename https://pypi.python.or...(and 40 more)
[INFO]: six download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading pyjnius
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 54 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/pyjnius
[INFO]: -> running basename https://github.com/kiv...(and 27 more)
[INFO]: pyjnius download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Downloading kivy
[INFO]: -> running mkdir -p /home/dev/Modelos/tes...(and 51 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/packages/kivy
[INFO]: -> running basename https://github.com/kiv...(and 25 more)
[INFO]: kivy download already cached, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: # Building all recipes for arch armeabi-v7a
[INFO]: # Unpacking recipes
[INFO]: Unpacking hostpython2 for armeabi-v7a
[INFO]: -> running basename https://www.python.org...(and 36 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]: hostpython2 is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking sdl2_image for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.or...(and 52 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]: sdl2_image is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking sdl2_mixer for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.or...(and 52 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]: sdl2_mixer is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking sdl2_ttf for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org...(and 48 more)
work[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]: sdl2_ttf is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking python2 for armeabi-v7a
[INFO]: -> running basename https://www.python.org...(and 36 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_9
[INFO]: python2 is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking sdl2 for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org...(and 26 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]: sdl2 is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking six for armeabi-v7a
[INFO]: -> running basename https://pypi.python.or...(and 40 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a__ndk_target_9
[INFO]: six is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking pyjnius for armeabi-v7a
[INFO]: -> running basename https://github.com/kiv...(and 27 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_9
[INFO]: pyjnius is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: Unpacking kivy for armeabi-v7a
[INFO]: -> running basename https://github.com/kiv...(and 25 more)
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a__ndk_target_9
[INFO]: kivy is already unpacked, skipping
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]: # Prebuilding recipes
[INFO]: Prebuilding hostpython2 for armeabi-v7a
[INFO]: hostpython2 has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding sdl2_image for armeabi-v7a
[INFO]: sdl2_image has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sdl2_image[armeabi-v7a]
[INFO]: sdl2_image already patched, skipping
[INFO]: Prebuilding sdl2_mixer for armeabi-v7a
[INFO]: sdl2_mixer has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sdl2_mixer[armeabi-v7a]
[INFO]: sdl2_mixer already patched, skipping
[INFO]: Prebuilding sdl2_ttf for armeabi-v7a
[INFO]: sdl2_ttf has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding python2 for armeabi-v7a
[INFO]: python2 has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for python2[armeabi-v7a]
[INFO]: python2 already patched, skipping
[INFO]: Prebuilding sdl2 for armeabi-v7a
[INFO]: sdl2 has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sdl2[armeabi-v7a]
[INFO]: sdl2 already patched, skipping
[INFO]: Prebuilding six for armeabi-v7a
[INFO]: six has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding pyjnius for armeabi-v7a
[INFO]: pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for pyjnius[armeabi-v7a]
[INFO]: pyjnius already patched, skipping
[INFO]: Prebuilding kivy for armeabi-v7a
[INFO]: kivy has no prebuild_armeabi_v7a, skipping
[INFO]: # Building recipes
[INFO]: Building hostpython2 for armeabi-v7a
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]: -> directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build
[INFO]: <- directory context /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]: -> running cp Modules/Setup.dist /home/de...(and 128 more)
[INFO]: -> running make -C /home/dev/Modelos/test...(and 100 more)
working: make: *** [Parser/pgeException in thread background thread for pid 30028:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
ErrorReturnCode_2:
RAN: /usr/bin/make -C /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build
STDOUT:
make: Entering directory '/home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build'
/bin/sh /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Modules/makesetup -c /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Modules/config.c.in \
-s Modules \
Modules/Setup.config \
Modules/Setup.local \
Modules/Setup
The Makefile was updated, you may need to re-run make.
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/pgenmain.o -lpthread -ldl -lutil -o Parser/pgen
gcc: error: Parser/tokenizer_pgen.o: No such file or directory
gcc: error: Parser/printgrammar.o: No such file or directory
gcc: error: Parser/pgenmain.o: No such file or directory
Makefile:566: recipe for target 'Parser/pgen' failed
make: *** [Parser/pgen] Error 1
make: Leaving directory '/home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build'
STDERR:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 1039, in <module>
main()
File "/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 1033, in main
ToolchainCL()
File "/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 553, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 150, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/dev/Modelos/testea/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 191, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "pythonforandroid/build.py", line 634, in build_recipes
File "pythonforandroid/python.py", line 382, in build_arch
File "pythonforandroid/logger.py", line 178, in shprint
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 863, in next
self.wait()
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/home/dev/.local/lib/python2.7/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /usr/bin/make -C /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build
STDOUT:
make: Entering directory '/home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build'
/bin/sh /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Modules/makesetup -c /home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Modules/config.c.in \
-s Modules \
Modules/Setup.config \
Modules/Setup.local \
Modules/Setup
The Makefile was updated, you may need to re-run make.
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/pgenmain.o -lpthread -ldl -lutil -o Parser/pgen
gcc: error: Parser/tokenizer_pgen.o: No such file or directory
gcc: error: Parser/printgrammar.o: No such file or directory
gcc: error: Parser/pgenmain.o: No such file or directory
Makefile:566: recipe for target 'Parser/pgen' failed
make: *** [Parser/pgen] Error 1
make: Leaving directory '/home/dev/Modelos/testea/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build'
STDERR:
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python2,kivy --ndk-api 9 --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/dev/Modelos/testea/.buildozer/android/platform/build"
#
# 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
I recommend you try using NDK r17c, because the older ones have different, outdated compilers and I imagine that could be causing your problem. Get it from here: https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip
Also just as a heads up, you may have to specify android.api and android.min_api to at least 21 on git master. I don't think the older API versions work unless you use python2legacy which is not recommended (it's simply not maintained to a similar level as the regular python2)
Thanks @AndreMiras and @JonasT after several attempts and tinkering with many of the Buildozer files, I finally understood what was wrong and updated correctly as indicated. I tested it and my apk was created, I made another app and I used the buildozer again and it worked as expected, really thanks!
for other people who may have this same problem, I put here everything I did to solve the bug.
Ok, first, this was a bug where the buildozer.spec file for some reason did not properly update the p4a files and there was also an error with the version of ndk used.
First I downloaded the r17c version of NDK as indicated by JonasT I went to the /home/dev/.buildozer/android/platform/
path and extract the downloaded file.
Then in the path /home/dev/buildozer/buildozer/default.spec
I changed the branch used in p4a for the master and it looked like this:
# p4a.branch = master
I have also changed the following lines:
# (int) Android API to use
# android.api = 21
# (int) Minimum API required. You will need to set the android.ndk.api to be as low as this value.
# android.minapi = 21
# (int) Android SDK version to use
# android.sdk = 20
# (str) Android NDK version to use
# android.ndk = r17c
# (int) Android NDK API to use (optional). This is the minimum API your app will support.
# android.ndk_api = 19
Well, that initially did not change anything in the way the construction was being done and it continued to make a mistake. So I went on the path
/ home / dev / buildozer / buildozer / targets /
and in the file android.py
I changed lines 17, 18 and 20 thus:
ANDROID_API = '21' #line 17
ANDROID_MINAPI = '21' #line 18
ANDROID_SDK_VERSION = '20'
ANDROID_NDK_VERSION = '17c' #line 20
APACHE_ANT_VERSION = '1.9.4'
in this same file, in the TargetAndroid
class I changed lines 46 (the old name is python-for-android-new-version) and 47, the class looks like this:
class TargetAndroid (Target):
targetname = 'android_old'
p4a_directory = "python-for-android" #line 46
p4a_branch = 'master' #line 47
p4a_apk_cmd = "python build.py"
Ok, in this same path has a file called android_new.py
, in the TargetAndroidNew
class I changed lines 16 and 17, the class looks like this:
class TargetAndroidNew (TargetAndroid):
targetname = 'android'
p4a_branch = "master" #line 16
p4a_directory = "python-for-android" #line 17
p4a_apk_cmd = "apk --debug --bootstrap ="
extra_p4a_args = ''
Ok, this should already work, but for some reason there is another path with pretty much the same files, so I made the same changes. No path
/home/dev/buildozer/build/lib.linux-x86_64-2.7/buildozer/
I changed the default.spec
file as I had done previously. And in the path
/home/dev/buildozer/build/lib.linux-x86_64-2.7/buildozer/targets/
I've changed the files android.py
and android_new.py
in the same way as I previously did.
Now the buildozer performs the proper update of p4a and ndk and works correctly.
Thanks @AndreMiras and @JonasT after several attempts and tinkering with many of the Buildozer files, I finally understood what was wrong and updated correctly as indicated. I tested it and my apk was created, I made another app and I used the buildozer again and it worked as expected, really thanks!
for other people who may have this same problem, I put here everything I did to solve the bug. Ok, first, this was a bug where the buildozer.spec file for some reason did not properly update the p4a files and there was also an error with the version of ndk used. First I downloaded the r17c version of NDK as indicated by JonasT I went to the
/home/dev/.buildozer/android/platform/
path and extract the downloaded file. Then in the path/home/dev/buildozer/buildozer/default.spec
I changed the branch used in p4a for the master and it looked like this:# p4a.branch = master
I have also changed the following lines:
# (int) Android API to use # android.api = 21 # (int) Minimum API required. You will need to set the android.ndk.api to be as low as this value. # android.minapi = 21 # (int) Android SDK version to use # android.sdk = 20 # (str) Android NDK version to use # android.ndk = r17c # (int) Android NDK API to use (optional). This is the minimum API your app will support. # android.ndk_api = 19
Well, that initially did not change anything in the way the construction was being done and it continued to make a mistake. So I went on the path
/ home / dev / buildozer / buildozer / targets /
and in the fileandroid.py
I changed lines 17, 18 and 20 thus:ANDROID_API = '21' #line 17 ANDROID_MINAPI = '21' #line 18 ANDROID_SDK_VERSION = '20' ANDROID_NDK_VERSION = '17c' #line 20 APACHE_ANT_VERSION = '1.9.4'
in this same file, in the
TargetAndroid
class I changed lines 46 (the old name is python-for-android-new-version) and 47, the class looks like this:class TargetAndroid (Target): targetname = 'android_old' p4a_directory = "python-for-android" #line 46 p4a_branch = 'master' #line 47 p4a_apk_cmd = "python build.py"
Ok, in this same path has a file called
android_new.py
, in theTargetAndroidNew
class I changed lines 16 and 17, the class looks like this:class TargetAndroidNew (TargetAndroid): targetname = 'android' p4a_branch = "master" #line 16 p4a_directory = "python-for-android" #line 17 p4a_apk_cmd = "apk --debug --bootstrap =" extra_p4a_args = ''
Ok, this should already work, but for some reason there is another path with pretty much the same files, so I made the same changes. No path
/home/dev/buildozer/build/lib.linux-x86_64-2.7/buildozer/
I changed thedefault.spec
file as I had done previously. And in the path/home/dev/buildozer/build/lib.linux-x86_64-2.7/buildozer/targets/
I've changed the filesandroid.py
andandroid_new.py
in the same way as I previously did. Now the buildozer performs the proper update of p4a and ndk and works correctly.
could you help me with the extraction part? I did not understand that
bro, could you please help me I am facing this problem from three months. I am doing my minor need your help I need to submit the project I am unable to generate apk .i ma facing same ndk problem can plz share your contact number or WhatsApp number or any social media id so that I can contact you I have downloaded latest ndk r20, but facing problem in extraction I mean I am unable to find .buildozer/android/platform to extract there also facing problem in editing android.py and Andriod-new.py
bro, could you please help me I am facing this problem from three months. I am doing my minor need your help I need to submit the project I am unable to generate apk .i ma facing same ndk problem can plz share your contact number or WhatsApp number or any social media id so that I can contact you I have downloaded latest ndk r20, but facing problem in extraction I mean I am unable to find .buildozer/android/platform to extract there also facing problem in editing android.py and Andriod-new.py
Well, everything I did to solve the problem is described above, but if you want help send an email to athoskenew@gmail.com
Versions
Description
Buildozer does not proceed with the creation of the App by an error in toolchain.py and arguments --ndk-api 9. I switched to all cython versions from 0.21 to the latest, but nothing has changed. I went in the android sdk folder and made several updates, however the problem still persists.
buildozer.spec
Command:
Spec file:
Logs