Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file missing while building apk using buildozer #918

Closed
farbodpm opened this issue Jun 16, 2019 · 5 comments
Closed

file missing while building apk using buildozer #918

farbodpm opened this issue Jun 16, 2019 · 5 comments

Comments

@farbodpm
Copy link

farbodpm commented Jun 16, 2019

Hello,
I want to make an APK with buildozer using kivy. Every thing goes well until I faced this ERROR.

/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/python-installs/texttospeech/bin/python.host setup.py build_ext -v

the log file contains bellow:

farbod@farbod:~/Gold/Python-Kivy-Android-app-master$ sudo buildozer android debug deploy run logca
# Check configuration tokens
Buildozer is running as root!
This is not recommended, and may lead to problems later.
Are you sure you want to continue [y/n]? y
# Ensure build layout
# Create directory /home/farbod/.buildozer
# Create directory /home/farbod/.buildozer/cache
# Create directory /home/farbod/.buildozer/android/platform/android/platform
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.4 (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 /usr/local/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-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Android ANT is missing, downloading
# Downloading http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz
# Run 'tar xzf apache-ant-1.9.4-bin.tar.gz'
# Cwd /home/farbod/.buildozer/android/platform
# Apache ANT installation done.
# Android SDK found at /home/farbod/android-sdk
# Android NDK found at /home/farbod/Downloads/crystax-ndk-10.3.2
# Check application requirements
# Check garden requirements
# Compile platform
# Using custom source dirs:
    P4A_kivy_DIR = /usr/lib/python2.7/dist-packages/kivy
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=texttospeech --bootstrap=sdl2 --requirements=python2crystax,kivy,pyjnius --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build'
# Cwd /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (21, 26)
[INFO]:    Requested API target 21 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[WARNING]: NDK version was set as r10.3.2., but checking the NDK dir claims it is 10.3.2.
[WARNING]: The build will try to continue, but it may fail and you should check that your setting is correct.
[WARNING]: If the NDK dir result is correct, you don't need to manually set the NDK ver.
[INFO]:    Using Crystax NDK r10.3.2.
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']
[INFO]:    Picking the latest gcc toolchain, here 5
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', u'python2crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython3crystax', u'python2crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', u'python2crystax', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['hostpython2', u'python2crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The selected bootstrap is sdl2_gradle
[INFO]:    # Creating dist with sdl2_gradle bootstrap
[INFO]:    Dist will have name texttospeech and recipes (python2crystax, kivy, pyjnius)
[INFO]:    Dist will also contain modules (python2crystax) installed from pip
[INFO]:    -> running cp -r /home/farbod/Gold/Python...(and 243 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The requirements (python2crystax) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 82 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 81 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 81 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 79 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 78 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 75 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 74 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/farbod/Gold/Pyt...(and 78 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading kivy
[INFO]:    P4A_kivy_DIR is set, skipping download for kivy
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi-v7a
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
           work[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking six for armeabi-v7a
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename https://github.com/kiv...(and 27 more)
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    P4A_kivy_DIR exists, symlinking instead
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for armeabi-v7a
[INFO]:    -> running cp /home/farbod/Gold/Python-Ki...(and 266 more)
[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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]:    hostpython already exists, skipping build
[INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Building sdl2_image for armeabi-v7a
[INFO]:    Building sdl2_mixer for armeabi-v7a
[INFO]:    Building sdl2_ttf for armeabi-v7a
[INFO]:    Building python2 for armeabi-v7a
[INFO]:    Copying hostpython binary to targetpython folder
[INFO]:    -> running cp /home/farbod/Gold/Python-Ki...(and 251 more)
[INFO]:    Building sdl2 for armeabi-v7a
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    -> running ndk-build V=1
           working: [armeabi-v7a] Install  [INFO]:    <- directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master
[INFO]:    Building six for armeabi-v7a
[INFO]:    Python package already exists in site-packages
[INFO]:    six said it is already built, skipping
[INFO]:    Building pyjnius for armeabi-v7a
[INFO]:    Python package already exists in site-packages
[INFO]:    pyjnius said it is already built, skipping
[INFO]:    Building kivy for armeabi-v7a
[INFO]:    kivy apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in kivy
[INFO]:    -> directory context /home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a/kivy
[INFO]:    -> running python.host -c import sys; print(sys.path)
[INFO]:    Trying first build of kivy to get cython files: this is expected to fail
[INFO]:    -> running python.host setup.py build_ext -v
('cwd is', '/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a/kivy')
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/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 573, in build_recipes
  File "pythonforandroid/recipe.py", line 928, in build_arch
  File "pythonforandroid/recipe.py", line 956, in build_cython_components
  File "pythonforandroid/logger.py", line 175, in shprint
    
  File "/usr/lib/python2.7/dist-packages/sh.py", line 565, in next
    self.wait()
  File "/usr/lib/python2.7/dist-packages/sh.py", line 500, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/lib/python2.7/dist-packages/sh.py", line 516, in handle_command_exit_code
    raise exc(self.ran, self.process.stdout, self.process.stderr)
sh.ErrorReturnCode_2: 

  RAN: '/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/python-installs/texttospeech/bin/python.host setup.py build_ext -v'

  STDOUT:
/home/farbod/Gold/Python-Kivy-Android-app-master/.buildozer/android/platform/build/build/python-installs/texttospeech/bin/python.host: can't open file 'setup.py': [Errno 2] No such file or directory


  STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=texttospeech --bootstrap=sdl2 --requirements=python2crystax,kivy,pyjnius --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/farbod/Gold/Python-Kivy-Android-app-master/.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 don't have any idea what should I do and where the problem is.

@AndreMiras
Copy link
Member

I'm not sure yet why you get such error, but I can ask and recommend a few things.

  1. don't sudo buildozer
  2. your logcat seems misspelled and miss the final t
  3. share your buildozer.spec
  4. you seems to be using CrystaX which is no longer the recommended p4a NDK
  5. you seem o be using target Python2 which also is not recommended
  6. make sure you're on p4a.branch = master
  7. clean your .buildozer/ before retrying

@farbodpm
Copy link
Author

farbodpm commented Jun 16, 2019

I'm not sure yet why you get such error, but I can ask and recommend a few things.

1. don't `sudo buildozer`

2. your `logcat` seems misspelled and miss the final `t`

3. share your `buildozer.spec`

4. you seems to be using CrystaX which is no longer the recommended p4a NDK

5. you seem o be using target Python2 which also is not recommended

6. make sure you're on `p4a.branch = master`

7. clean your `.buildozer/` before retrying

Here is my buildozer.spec:

[app]

# (str) Title of your application
title = Text2Speech

# (str) Package name
package.name = texttospeech

# (str) Package domain (needed for android/ios packaging)
package.domain = org.rockcastle

# (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 = 

# (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

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


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

# (str) Application versioning (method 2)
version = 1.0

# (list) Application requirements
# comma seperated e.g. requirements = sqlite3,kivy
#requirements = pyjnius,python2,crystax,kivy
requirements = python2crystax,kivy,pyjnius
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy
requirements.source.kivy = /usr/lib/python2.7/dist-packages/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, portrait or all)
orientation = all

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


#
# Android specific
#

# (list) Permissions
#android.permissions = INTERNET,BATTERY_STATS,VIBRATE
android.permissions = INTERNET


# (int) Android API to use
#android.api = 14
android.api = 21

# (int) Minimum API required (8 = Android 2.2 devices)
#android.minapi = 8
android.minapi = 15

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

# (str) Android NDK version to use
#android.ndk = 14
android.ndk = 10.3.2.
# (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 = /usr/local/Cellar/android-sdk/ndk-bundle
android.ndk_path = /home/farbod/Downloads/crystax-ndk-10.3.2

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =
android.sdk_path = /home/farbod/android-sdk/

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

# (list) python-for-android whitelist
#android.p4a_whitelist =

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

# (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 =

# (str) python-for-android branch to use, if not master, useful to try
# not yet merged features.
#android.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 =

# (list) Android additionnal 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 =

#
# iOS specific
#

# (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
#ios.codesign.debug = "iPhone Developer: Isa Bostan (X)"
#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


#    -----------------------------------------------------------------------------
#    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

@farbodpm
Copy link
Author

I'm not sure yet why you get such error, but I can ask and recommend a few things.

1. don't `sudo buildozer`

2. your `logcat` seems misspelled and miss the final `t`

3. share your `buildozer.spec`

4. you seems to be using CrystaX which is no longer the recommended p4a NDK

5. you seem o be using target Python2 which also is not recommended

6. make sure you're on `p4a.branch = master`

7. clean your `.buildozer/` before retrying

about sudo command. I have to use it because pip won't work if I don't use sudo. I don't know how to fix this problem too.

@AndreMiras
Copy link
Member

Yes I see, but pip should behave differently than buildozer.
And for pip you can always add the --user flag to install things to ~/.local. Just make sure $HOME/.local/bin is in your path.
As for your buildozer.spec definitely try without a custom NDK and with python3 in your requirements.

@AndreMiras
Copy link
Member

I just saw you had requirements = python2crystax,kivy,pyjnius in your requirements, but python2crystax is no longer supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants