Git Product home page Git Product logo

buildozer's Introduction

Buildozer

Buildozer is a development tool for turning Python applications into binary packages ready for installation on any of a number of platforms, including mobile devices.

The app developer provides a single "buildozer.spec" file, which describes the application's requirements and settings, such as title and icons. Buildozer can then create installable packages for Android, iOS, Windows, macOS and/or Linux.

Buildozer is managed by the Kivy Team. It relies on its sibling projects: python-for-android and Kivy for iOS. It has features to make building apps using the Kivy framework easier, but it can be used independently - even with other GUI frameworks.

For Android, buildozer will automatically download and prepare the build dependencies. For more information, see Android SDK NDK Information.

Note

This tool is unrelated to the online build service, buildozer.io.

Backers on Open Collective Sponsors on Open Collective GitHub contributors Contributor Covenant

PyPI - Version PyPI - Python Version

Tests Android iOS Coverage Status

Installation

Buildozer

Installing Buildozer with target Python 3 (default):

Buildozer incorporates a number of technologies, and has a complicated dependencies, including platform dependencies outside of Python.

This means installation is more than a simple pip install; many of our support requests are related to missing dependencies.

So, it is important to follow the instructions carefully.

Please see the Installation documentation specific to this version.

Buildozer Docker image

A Dockerfile is available to use buildozer through a Docker environment.

  • Build with:
docker build --tag=kivy/buildozer .

For macOS, build with:

docker buildx build --platform=linux/amd64 -t kivy/buildozer .
  • Run with:
docker run --volume "$(pwd)":/home/user/hostcwd kivy/buildozer --version

Warning

DockerHub contains an obsolete Docker image for Buildozer. It is deprecated. Build your own.

Example Build with Caching

  • Build and keep downloaded SDK and NDK in ~/.buildozer directory:
docker run -v $HOME/.buildozer:/home/user/.buildozer -v $(pwd):/home/user/hostcwd kivy/buildozer android debug

Buildozer GitHub action

Use ArtemSBulgakov/buildozer-action@v1 to build your packages automatically on push or pull request. See full workflow example.

Warning

This GitHub action may use an obsolete version of Buildozer; use with caution.

Usage

Usage:
    buildozer [--profile <name>] [--verbose] [target] <command>...
    buildozer --version

Available targets:
    android        Android target, based on python-for-android project
    ios            iOS target, based on kivy-ios project

Global commands (without target):
    distclean          Clean the whole Buildozer environment
    help               Show the Buildozer help
    init               Create an initial buildozer.spec in the current directory
    serve              Serve the bin directory via SimpleHTTPServer
    setdefault         Set the default command to run when no arguments are given
    version            Show the Buildozer version

Target commands:
    clean      Clean the target environment
    update     Update the target dependencies
    debug      Build the application in debug mode
    release    Build the application in release mode
    deploy     Deploy the application on the device
    run        Run the application on the device
    serve      Serve the bin directory via SimpleHTTPServer

Target "ios" commands:
    list_identities    List the available identities to use for signing.
    xcode              Open the xcode project.

Target "android" commands:
    adb                Run adb from the Android SDK. Args must come after --, or
                        use --alias to make an alias
    logcat             Show the log from the device
    p4a                Run p4a commands. Args must come after --, or use --alias
                        to make an alias

Examples of Buildozer commands

# buildozer target command
buildozer android clean
buildozer android update
buildozer android deploy
buildozer android debug
buildozer android release

# or all in one (compile in debug, deploy on device)
buildozer android debug deploy

# set the default command if nothing set
buildozer setdefault android debug deploy run

buildozer.spec

Run buildozer init to have a new buildozer.spec file copied into the current working directory. Edit it before running your first build.

See buildozer/default.spec for the template.

Default config

You can override the value of any buildozer.spec config token by setting an appropriate environment variable. These are all of the form $SECTION_TOKEN, where SECTION is the config file section and TOKEN is the config token to override. Dots are replaced by underscores.

For example, here are some config tokens from the [app] section of the config, along with the environment variables that would override them.

  • title -> $APP_TITLE
  • package.name -> $APP_PACKAGE_NAME
  • p4a.source_dir -> $APP_P4A_SOURCE_DIR

License

Buildozer is MIT licensed, actively developed by a great community and is supported by many projects managed by the Kivy Organization.

Documentation

Documentation for this repository.

Support

Are you having trouble using Buildozer or any of its related projects in the Kivy ecosystem? Is there an error you don’t understand? Are you trying to figure out how to use it? We have volunteers who can help!

The best channels to contact us for support are listed in the latest Contact Us document.

Contributing

Buildozer is part of the Kivy ecosystem - a large group of products used by many thousands of developers for free, but it is built entirely by the contributions of volunteers. We welcome (and rely on) users who want to give back to the community by contributing to the project.

Contributions can come in many forms. See the latest Contribution Guidelines for how you can help us.

Code of Conduct

In the interest of fostering an open and welcoming community, we as contributors and maintainers need to ensure participation in our project and our sister projects is a harassment-free and positive experience for everyone. It is vital that all interaction is conducted in a manner conveying respect, open-mindedness and gratitude.

Please consult the latest Code of Conduct.

Contributors

This project exists thanks to all the people who contribute. [Become a contributor].

Backers

Thank you to all of our backers! πŸ™ [Become a backer]

Sponsors

Special thanks to all of our sponsors, past and present. Support this project by [becoming a sponsor].

Here are our top current sponsors. Please click through to see their websites, and support them as they support us.

buildozer's People

Contributors

akshayaurora avatar andremiras avatar attakei avatar bob-the-hamster avatar brentpicasso avatar brousch avatar cbenhagen avatar dbrnz avatar dessant avatar fabiankreutz avatar hackalog avatar inclement avatar julian-o avatar keyweeusr avatar kived avatar lilyfoote avatar maho avatar misl6 avatar opacam avatar printathing avatar rambo avatar renovate[bot] avatar rnixx avatar robertflatt avatar sombernight avatar tito avatar tshirtman avatar vesellov avatar zen-code avatar zworkb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buildozer's Issues

sdk update fails on license question

when the sdk is updated it may ask to agree to the license terms. in that case buildozer stops waiting for a 'y'. the license text and question is not visible...

Builds fail on Ubuntu 13.04 with zlib.h missing

When building kivy's takepicture example using

$ cd .../takepicture
$ buildozer android debug deploy run

it eventually fails with:

./Modules/zlibmodule.c:8:18: fatal error: zlib.h: No such file or directory

Aparently zlib.h must be installed. This should be done automatically or at least the user should be told how to do it.

Detailed log:

2013-07-06 11:14:57 (3,20 MB/s) - β€˜kivy-stable.zip’ saved [14281911/14281911]

configure: WARNING:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

Parser/parsetok.c: In function β€˜parsetok’:
Parser/parsetok.c:134:43: warning: variable β€˜handling_with’ set but not used [-Wunused-but-set-variable]
Parser/pgen.c: In function β€˜compile_atom’:
Parser/pgen.c:282:9: warning: variable β€˜i’ set but not used [-Wunused-but-set-variable]
Python/pyarena.c: In function β€˜PyArena_Free’:
Python/pyarena.c:162:9: warning: variable β€˜r’ set but not used [-Wunused-but-set-variable]
In file included from Python/thread.c:121:0:
Python/thread_pthread.h: In function β€˜PyThread_free_lock’:
Python/thread_pthread.h:285:17: warning: variable β€˜error’ set but not used [-Wunused-but-set-variable]
Python/thread_pthread.h: In function β€˜PyThread_acquire_lock’:
Python/thread_pthread.h:315:17: warning: variable β€˜error’ set but not used [-Wunused-but-set-variable]
Python/thread_pthread.h: In function β€˜PyThread_release_lock’:
Python/thread_pthread.h:342:17: warning: variable β€˜error’ set but not used [-Wunused-but-set-variable]
./Modules/signalmodule.c: In function β€˜trip_signal’:
./Modules/signalmodule.c:180:14: warning: ignoring return value of β€˜write’, declared with attribute warn_unused_result [-Wunused-result]
./Modules/_collectionsmodule.c: In function β€˜deque_clearmethod’:
./Modules/_collectionsmodule.c:707:9: warning: variable β€˜rv’ set but not used [-Wunused-but-set-variable]
./Modules/socketmodule.c: In function β€˜socket_gethostbyname_ex’:
./Modules/socketmodule.c:3371:9: warning: variable β€˜result’ set but not used [-Wunused-but-set-variable]
./Modules/socketmodule.c: In function β€˜socket_gethostbyaddr’:
./Modules/socketmodule.c:3447:9: warning: variable β€˜result’ set but not used [-Wunused-but-set-variable]
./Modules/zlibmodule.c:8:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [Modules/zlibmodule.o] Error 1
make: *** Waiting for unfinished jobs....

--- end commend failed
- Distribution compiled.
- Build the application
- Copy /home/someone/workspace/kivy/examples/android/takepicture/shadow32.png
- Copy /home/someone/workspace/kivy/examples/android/takepicture/main.py
- Copy /home/someone/workspace/kivy/examples/android/takepicture/takepicture.kv
- Package the application
- Captured version: 0.1
- run '/usr/bin/python2.7 build.py --name TakePicture --version 0.1 --package org.test.takepicture --private /home/someone/workspace/kivy/examples/android/takepicture/.buildozer/android/app --sdk 14 --minsdk 8 --permission CAMERA debug'
--- command failed
-- stdout output

-- stderr output
/usr/bin/python2.7: can't open file 'build.py': [Errno 2] No such file or directory

--- end commend failed
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 5, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 439, in run
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 368, in run_command
    self.target.run_commands(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 45, in run_commands
    getattr(self, 'cmd_{0}'.format(command))(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 57, in cmd_debug
    self.buildozer.build()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 402, in build
    self.target.build_package()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 347, in build_package
    join(self.buildozer.bin_dir, apk))
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/someone/workspace/kivy/examples/android/takepicture/.buildozer/android/platform/python-for-android/dist/default/bin/TakePicture-0.1-debug.apk'

incorrect minapi android manifest value

my buildozer.spec

(int) Android API to use

android.api = 19

(int) Minimum API required (8 = Android 2.2 devices)

android.minapi = 12

(int) Android SDK version to use

android.sdk = 19

(str) Android NDK version to use

android.ndk = 9

and the generate crossponding manifest (AndroidManifest.xml) is:

Command failed: ./distribute.sh -m "kivy" error message

When I try buildozer it fails with following message. Is it possible to auto-download this missing file (distribute.sh) and proceed? If not, how to resolve this manually ?

$ buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Apache ANT found at /root/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /root/.buildozer/android/platform/android-sdk-21
# Android NDK found at /root/.buildozer/android/platform/android-ndk-r9
# Android packages already installed.
# Check application requirements
# Compile platform
# Command failed: ./distribute.sh -m "kivy"

btw, thanks for this nice tool :)

failing to compile sample android app with buildozer

Hey,

I am on ubuntu 13.10 and I installed buildozer via pip.
Now, in a directory with a simple main.py, I run:

buildozer init

Then I change the requirements in the buildozer.spec so that it reads:

requirements = kivy pyjnius

and I run

 buildozer --verbose android debug deploy run

which finishes with this error message:

# Install requirement kivy pyjnius in virtualenv
# Run 'pip-2.7 install --download-cache=/home/ls/.buildozer/cache --target=/home/ls/src/BuildozerTest/.buildozer/applibs kivy pyjnius'
# Cwd /home/ls/src/BuildozerTest/.buildozer
Downloading/unpacking kivy
  Using download cache from /home/ls/.buildozer/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FK%2FKivy%2FKivy-1.7.2.tar.gz
  Running setup.py egg_info for package kivy

    Cython is missing, its required for compiling kivy !


    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/ls/src/BuildozerTest/.buildozer/venv/build/kivy/setup.py", line 58, in <module>
        from Cython.Distutils import build_ext
    ImportError: No module named Cython.Distutils
    Complete output from command python setup.py egg_info:


Cython is missing, its required for compiling kivy !





Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/home/ls/src/BuildozerTest/.buildozer/venv/build/kivy/setup.py", line 58, in <module>

    from Cython.Distutils import build_ext

ImportError: No module named Cython.Distutils

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/ls/src/BuildozerTest/.buildozer/venv/build/kivy
Storing complete log in /home/ls/.pip/pip.log
# Command failed: pip-2.7 install --download-cache=/home/ls/.buildozer/cache --target=/home/ls/src/BuildozerTest/.buildozer/applibs kivy pyjnius

Garden packages are unsupported

Garden packages currently have to be installed with the --app arg for buildozer to include them when building. This clutters the App's directory, and makes version control messier.

A better solution would be to add a key to buildozer.spec allowing a user to specify required garden modules. This functionality is already available for packages installable with pip.

Selective update of depencencies

It's quite annoying to wait for the recompilation of everything, including the slower Python, while the only thing that needs to be update is kivy. I think that the update argument should use this syntax:

--update all     # current behavior of update
--update module  # update just that module and then do all the other stuff (e.g. build the apk)

# for example:
--update kivy

Is it possible?

[app] "android.permission" contain an unknown permission

When I run buildozer, I get the following error:

james@rhinoctopus:~/src/secrethamster/kivy/bobdirt$ buildozer android debug deploy
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Check target configuration tokens
#1 error(s) found in the buildozer.spec
[app] "android.permission" contain an unknown permission 

My buildozer.spec does not modify the default for android.permissions:

# (list) Permissions
#android.permissions = INTERNET

libpython wait4 linker error

D/dalvikvm(32727): GC_CONCURRENT freed 387K, 21% free 4117K/5188K, paused 1ms+2ms, total 13ms
V/codec_audio_pad( 1292): in normal mode, headset or speaker on,****LINE:43,FUNC:set_normal_pathοΏ½οΏ½headset_on=0,headphone_on=0
V/codec_audio_pad( 1292): in normal mode, headset or speaker on,****LINE:53,FUNC:set_normal_path
I/ActivityManager( 2000): START u0 {act=com.android.systemui.recent.action.TOGGLE_RECENTS flg=0x10800000 cmp=com.android.systemui/.recent.RecentsActivity} from pid 2605
I/ActivityManager( 2000): Displayed com.android.systemui/.recent.RecentsActivity: +149ms
D/dalvikvm( 4461): GC_CONCURRENT freed 405K, 21% free 4182K/5272K, paused 1ms+1ms, total 15ms
I/ActivityManager( 2000): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.testapp.app/org.renpy.android.PythonActivity} from pid 2720
D/dalvikvm( 1773): Late-enabling CheckJNI
I/ActivityManager( 2000): Start proc com.testapp.app:python for activity com.testapp.app/org.renpy.android.PythonActivity: pid=1773 uid=10063 gids={50063, 1023, 1015, 1028}
I/dalvikvm( 1773): Turning on JNI app bug workarounds for target SDK version 8...
V/WindowManager( 2000): rotationForOrientationLw(orient=0, last=1); user=2 
V/python  ( 1773): metadata fullscreen is1
I/SDLSurface( 1773): Surface will NOT be transparent
D/dalvikvm( 1773): Trying to load lib /mnt/asec/com.testapp.app-2/lib/libsdl.so 0x42526b98
D/dalvikvm( 1773): Added shared lib /mnt/asec/com.testapp.app-2/lib/libsdl.so 0x42526b98
D/dalvikvm( 1773): Trying to load lib /mnt/asec/com.testapp.app-2/lib/libsdl_image.so 0x42526b98
D/dalvikvm( 1773): Added shared lib /mnt/asec/com.testapp.app-2/lib/libsdl_image.so 0x42526b98
D/dalvikvm( 1773): No JNI_OnLoad found in /mnt/asec/com.testapp.app-2/lib/libsdl_image.so 0x42526b98, skipping init
D/dalvikvm( 1773): Trying to load lib /mnt/asec/com.testapp.app-2/lib/libsdl_ttf.so 0x42526b98
D/dalvikvm( 1773): Added shared lib /mnt/asec/com.testapp.app-2/lib/libsdl_ttf.so 0x42526b98
D/dalvikvm( 1773): No JNI_OnLoad found in /mnt/asec/com.testapp.app-2/lib/libsdl_ttf.so 0x42526b98, skipping init
D/dalvikvm( 1773): Trying to load lib /mnt/asec/com.testapp.app-2/lib/libsdl_mixer.so 0x42526b98
D/dalvikvm( 1773): Added shared lib /mnt/asec/com.testapp.app-2/lib/libsdl_mixer.so 0x42526b98
D/dalvikvm( 1773): No JNI_OnLoad found in /mnt/asec/com.testapp.app-2/lib/libsdl_mixer.so 0x42526b98, skipping init
D/dalvikvm( 1773): Trying to load lib /mnt/asec/com.testapp.app-2/lib/libpython2.7.so 0x42526b98
E/dalvikvm( 1773): dlopen("/mnt/asec/com.testapp.app-2/lib/libpython2.7.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "wait4" referenced by "libpython2.7.so"...
W/dalvikvm( 1773): threadid=11: thread exiting with uncaught exception (group=0x4207e930)
E/AndroidRuntime( 1773): FATAL EXCEPTION: Thread-551
E/AndroidRuntime( 1773): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "wait4" referenced by "libpython2.7.so"...
E/AndroidRuntime( 1773):    at java.lang.Runtime.loadLibrary(Runtime.java:371)
E/AndroidRuntime( 1773):    at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime( 1773):    at org.renpy.android.PythonActivity.run(PythonActivity.java:254)
E/AndroidRuntime( 1773):    at java.lang.Thread.run(Thread.java:856)
V/PhoneStatusBar( 2605): setLightsOn(true)
W/ActivityManager( 2000):   Force finishing activity com.testapp.app/org.renpy.android.PythonActivity
D/libEGL  ( 1773): loaded /vendor/lib/egl/libEGL_POWERVR_SGX544_115.so
W/DropBoxManagerService( 2000): Dropping: data_app_crash (522 > 0 bytes)
D/libEGL  ( 1773): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_115.so
D/libEGL  ( 1773): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX544_115.so
D/OpenGLRenderer( 1773): Enabling debug mode 0
D/dalvikvm( 2000): GC_FOR_ALLOC freed 2788K, 32% free 12431K/18060K, paused 90ms, total 90ms
V/WindowManager( 2000): rotationForOrientationLw(orient=-1, last=1); user=2 
I/SDLSurface( 1773): Choose egl configuration
I/SDLSurface( 1773): Try to use graphics config R8G8B8A8S8
W/ThrottleService( 2000): unable to find stats for iface rmnet0
W/SDLSurface( 1773): Create egl surface
D/dalvikvm( 1773): GC_CONCURRENT freed 68K, 15% free 4413K/5168K, paused 6ms+1ms, total 26ms
D/dalvikvm( 1773): WAIT_FOR_CONCURRENT_GC blocked 9ms
I/dalvikvm-heap( 1773): Grow heap (frag case) to 5.473MB for 524304-byte allocation
D/dalvikvm( 1773): GC_FOR_ALLOC freed 1K, 14% free 4924K/5684K, paused 17ms, total 17ms
D/dalvikvm( 1773): GC_CONCURRENT freed <1K, 14% free 4925K/5684K, paused 2ms+1ms, total 19ms
W/InputMethodManagerService( 2000): Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4251f348 (uid=10063 pid=1773)
I/ActivityManager( 2000): Displayed com.testapp.app/org.renpy.android.PythonActivity: +567ms
D/AndroidRuntime( 1773): Shutting down VM
W/dalvikvm( 1773): threadid=1: thread exiting with uncaught exception (group=0x4207e930)
I/Process ( 1773): Sending signal. PID: 1773 SIG: 9
I/ActivityManager( 2000): Process com.testapp.app:python (pid 1773) has died.
I/WindowState( 2000): WIN DEATH: Window{429a8de8 u0 SurfaceView EXITING}
W/InputDispatcher( 2000): channel '42bbecf8 com.testapp.app/org.renpy.android.PythonActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher( 2000): channel '42bbecf8 com.testapp.app/org.renpy.android.PythonActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 2000): Attempted to unregister already unregistered input channel '42bbecf8 com.testapp.app/org.renpy.android.PythonActivity (server)'
I/WindowState( 2000): WIN DEATH: Window{42bbecf8 u0 com.testapp.app/org.renpy.android.PythonActivity EXITING}
W/InputMethodManagerService( 2000): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4251a310 attribute=null, token = android.os.BinderProxy@42c166b0
D/dalvikvm( 4461): GC_CONCURRENT freed 409K, 21% free 4167K/5264K, paused 2ms+1ms, total 15ms
D/dalvikvm( 4461): GC_CONCURRENT freed 385K, 21% free 4172K/5264K, paused 1ms+2ms, total 14ms
D/dalvikvm( 4461): GC_CONCURRENT freed 389K, 21% free 4173K/5264K, paused 1ms+1ms, total 21ms
D/dalvikvm( 4461): GC_CONCURRENT freed 390K, 21% free 4173K/5264K, paused 1ms+2ms, total 14ms

Android 4.2.2 - Simmtronics XPADMini
reference:
#91 (after feeding the absolute path, installed the app on tablet)

example: http://python-for-android.readthedocs.org/en/latest/examples/

No module named sqlite3

Hello,

When I try to deploy my application to my smartphone, I can see it start and stop immediately (cf logcat traceback ).

I followed this doc to remove occurences of sqlite3 in the blacklist, and I manually ran ./distribute.sh -m 'sqlite3 kivy' in .buildozer/android/platform/python-for-android/ because I don't see a way to specify the module in the buildozer.spec file (if added to requirements, buildozer will pip install it).
Also note that ./distribute.sh -l return sqlite3, so it should be already available and buildozer shouldn't try to pip install it (also the pip package is pysqlite, not sqlite3, so I wasn't sure which name to write, and tried both without succcess).

I'm on arch linux. Any idea how to fix that sqlite3 issue ?

Thanks in advance !

buildozer.spec passing requirements

Hello,
I have been using buildozer on my desktop PC. In my buildozer.spec file in the requirements field should I write all the libraries I have imported in my .py files?

Thank you

debugging "Command failed" is tedious

Hi.

I ran into command invocation fails. Red text, no more info. After tediously grepping the code of buildozer i learned about show_output as a kwarg for buildozer.cmd. I also found the relevant cmd call and inserted show_output=True.

Now I could finally see the error messages, solve the problem and be done with it.
(I used a - character in the package.name in the spec file)

I propose an environment variable and command line option to activate helpfull output per "build" phase or something like that.

Error compiling Cython file:

This is my first time and my first time running buidozer and it prints the following error:

Leaving ARM enviromnent
Call build_pyjnius
Entering in ARM enviromnent
Compiler found at /home/ligia/.buildozer/android/platform/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin//arm-linux-androideabi-gcc
/home/ligia/kiv/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jnius
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ligia/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ligia/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -fPIC -I/home/ligia/kiv/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1

Error compiling Cython file:
------------------------------------------------------------
...

cdef class ByteArray:
    cdef LocalRef _jobject
    cdef long _size
    cdef jbyte *_buf
    cdef jbyte[:] _arr
              ^
------------------------------------------------------------

jnius/jnius_nativetypes.pxi:19:15: Expected an identifier or literal
/home/ligia/kiv/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ligia/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ligia/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -fPIC -I/home/ligia/kiv/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
jnius/jnius.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
error: command 'arm-linux-androideabi-gcc' failed with exit status 1
# Command failed: ./distribute.sh -m "kivy"

unresolved domain: pygame.org

Is it possible to skip pygame to build the project?

--2013-09-13 18:49:42--  http://pygame.org/ftp/pygame-1.9.1release.tar.gz
Resolving pygame.org... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address `pygame.org'

Command failed: ./distribute.sh -m "kivy"

x86 and armeabi-v7 libs

Hey,

Using android.add_libs_armeabi I can choose *.so files to be added to libs/armeabi. Nice!

But how can choose *.so files for libs/x86 and libs/armeabi-v7? Is that somehow possible?

_patch_application_sources breaks from __future__ imports

The method _patch_application_sources in buildozer/__init__.py prepends main.py with:

import sys, os; sys.path = [os.path.join(os.path.dirname(__file__), "_applibs")] + sys.path

This causes a syntax error if the original first line started with a from __future__ import statement, e.g.:

from __future__ import division
SyntaxError: ('from __future__ imports must occur at the beginning of the file', ('/home/ian/life/.buildozer/android/app/main.py', 2, None, 'from __future__ import division\n'))

"buildozer android update" fails with an error about android.branch

Using the latest buildozer from git, "buildozer android update" fails with the following error:

james@rhinoctopus:~/src/secrethamster/kivy/test$ buildozer android update
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Search for Git git
#  -> found at /usr/bin/git
# Search for Cython cython
#  -> found at /usr/local/bin/cython
# Search for Java compiler
#  -> found at /usr/lib/jvm/java-6-openjdk-i386/bin/javac
# Search for Java keytool
#  -> found at /usr/lib/jvm/java-6-openjdk-i386/jre/bin/keytool
# Install platform
# Run 'git clean -dxf'
# Cwd /home/james/src/secrethamster/kivy/test/.buildozer/android/platform/python-for-android
# Run 'git pull origin master'
# Cwd /home/james/src/secrethamster/kivy/test/.buildozer/android/platform/python-for-android
From git://github.com/kivy/python-for-android
 * branch            master     -> FETCH_HEAD
Already up-to-date.
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 5, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1005, in run
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 728, in run_command
    self.target.run_commands(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 71, in run_commands
    getattr(self, 'cmd_{0}'.format(command))(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 78, in cmd_update
    self.buildozer.prepare_for_build()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 110, in prepare_for_build
    self.target.install_platform()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 280, in install_platform
    source = self.buildozer.config.get('app', 'android.branch')
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'android.branch' in section: 'app'

Problem Ubuntu compilation on network drive

Entering in ARM enviromnent
Compiler found at /home/julien/.buildozer/android/platform/android-sdk-8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin//arm-linux-androideabi-gcc
find: "/mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/jni/../jni/application/src/": N'est pas un dossier
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Compile thumb  : png <= png.c
ccache /home/julien/.buildozer/android/platform/android-sdk-8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/obj/local/armeabi/objs/png/png.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/jni/../jni/png -DANDROID  -Wa,--noexecstack -O2 -DNDEBUG -g -I/home/julien/.buildozer/android/platform/android-sdk-8c/platforms/android-14/arch-arm/usr/include -c  /mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/jni/../jni/png/png.c -o /mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/obj/local/armeabi/objs/png/png.o 
make: *** [/mnt/dev/Kivy_Projects/kivymeteo-android/kivymeteo/.buildozer/android/platform/python-for-android/src/obj/local/armeabi/objs/png/png.o] Erreur de segmentation (core dumped)
# Command failed: ./distribute.sh -m "pil kivy"

Automatically installing Android SDK fails in file_rename called from _install_android_sdk

When buildozer attempts to install the Android SDK, it fails with the following traceback.

james@rhinoctopus:~/src/secrethamster/kivy/bobdirt$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Apache ANT found at /home/james/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK is missing, downloading
# Unpacking Android SDK
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 5, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1000, in run
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 726, in run_command
    self.target.run_commands(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 71, in run_commands
    getattr(self, 'cmd_{0}'.format(command))(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 81, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 110, in prepare_for_build
    self.target.install_platform()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 286, in install_platform
    self._install_android_sdk()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 219, in _install_android_sdk
    cwd=self.buildozer.global_platform_dir)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 411, in file_rename
    rename(source, target)
OSError: [Errno 2] No such file or directory

This is on Ubuntu Linux 12.04

buildozer does not support ~ in android.sdk_path

In my buildozer.spec file, I set:

android.sdk_path = ~/misc/android-sdk-linux_x86

which is the correct location for my already installed and working SDK. buildozer ignored that, tried to redownload the SDK anyway (but failed, I will file a separate issue for that)

james@rhinoctopus:~/src/secrethamster/kivy/bobdirt$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Android ANT is missing, downloading
# Apache ANT installation done.
# Android SDK is missing, downloading
# Unpacking Android SDK

Also, I am sure apache ant is installed, since I was using it before, and which ant returns /usr/bin/ant

I am using Ubuntu Linux 12.04

Bad magic number when reading generated state.db file in VMware Ubuntu guest

A gdb.error: Bad magic number is generated when you run buildozer immediately after initializing the working directory. The error is caused by the a code in buildozer/init.py

line 345 ... self.state = shelve.open(join(self.buildozer_dir, 'state.db')

It seems to be related to how the initial state.db file was created because once i delete it, everything is ok.

Uncaught exception on missing cython

New to kivy, trying out buildozer. When cython is missing, it looks like the exception isn't caught (and the "not found" string needs an extra space). Installing cython will fix the problem, but it might be nice to print the message & exit rather than stack trace.

$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 5, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1199, in run
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 838, in run_command
    self.target.run_commands(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 85, in run_commands
    func(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 95, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 134, in prepare_for_build
    self.target.check_requirements()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 125, in check_requirements
    checkbin('Cython cython', 'cython')
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 214, in checkbin
    raise Exception(msg + 'not found')
Exception: Cython cythonnot found

virtualenv-2.7 hardcoded

_ensure_virtualenv is assuming that the command virtualenv-2.7 is available, however on my platform it's just called virtualenv. Possibly this should be configurable somewhere, although assuming that the virtualenv command is available should also be safe, since a virtualenv-3.x binary should still be able to create python2.7 capable environments.

Similarly, hardcoding python2.7 is probably fragile in this method, as it may variously be named python, python2, or hippopotamus on different machines.

Buildozer fails to install on Windows

Buildozer fails to pip install on Windows. It is trying to use fcntl which is a Unix-only module in the Python core. Here is a console log using the Kivy for Windows from http://kivy.org/#download


C:\Users\ben\Projects\CleverDripTimer>c:\Kivy-1.7.2-w32\Python\Scripts\pip.exe install buildozer
Downloading/unpacking buildozer
Downloading buildozer-0.6.tar.gz
Running setup.py egg_info for package buildozer
Traceback (most recent call last):
File "", line 14, in
File "C:\Users\ben\Projects\CleverDripTimer\build\buildozer\setup.py", line 3, in
import buildozer
File "buildozer__init__.py", line 15, in
import fcntl
ImportError: No module named fcntl
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 14, in

File "C:\Users\ben\Projects\CleverDripTimer\build\buildozer\setup.py", line 3, in

import buildozer

File "buildozer__init__.py", line 15, in

import fcntl

ImportError: No module named fcntl


Command python setup.py egg_info failed with error code 1 in C:\Users\ben\Projects\CleverDripTimer\build\buildozer
Storing complete log in \nas1\ben\AppData\pip\pip.log


Buildozer error no build.py

I'm new to kivy and buildozer. I'm trying to create the pong tutorial program for android. When I enter the command

buildozer android debug deploy run... I get
Check configuration tokens
Ensure build layout
Check configuration tokens
Preparing build
Check requirements for android
Install platform
Apache ANT found at /home/sherman/.buildozer/android/platform/apache-ant-1.8.4
Android SDK found at /home/sherman/.buildozer/android/platform/android-sdk-21
Android NDK found at /home/sherman/.buildozer/android/platform/android-ndk-8e
Android packages already installed.
Check application requirements
Compile platform
Distribution already compiled, pass.
Build the application #17
Patched main.py to include applibs
Package the application
Command failed: /bin/python2.7 build.py --name Pong --version 0.1 --package org.test.pongapp --private /home/sherman/Projects/git-repository/pong/.buildozer/android/app --sdk 14 --minsdk 8 --orientation landscape debug

after poking around for a while I have found that it appears that it cannot find build.py. Where is this supposed to be?
I'm using Fedora 18 (64 bit).
I can compile and run the pong program locally fine. It is only when I try to package it for android using buildozer that this happens. I have tried reloading buildozer, that doesn't solve the problem.

Absolute path problem

buildozer --verbose android debug deploy run
\# Check configuration tokens
\# Ensure build layout
\# Check configuration tokens
\# Preparing build
\# Check requirements for android
\# Run 'dpkg --version'
\# Cwd None
/bin/sh: dpkg: command not found
\# Search for Git git
\#  -> found at /usr/bin/git
\# Search for Cython cython
\#  -> found at /usr/bin/cython
\# Search for Java compiler
\#  -> found at /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.x86_64/bin/javac
\# Search for Java keytool
\#  -> found at /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.x86_64/jre/bin/keytool
\# Install platform
\# Run 'ln -s ./python-for-android ./python-for-android'
\# Cwd /home/kuldeep/my-work/prjroot/project/android/.buildozer/android/platform
ln: failed to access β€˜./python-for-android’: Too many levels of symbolic links
\# Command failed: ln -s ./python-for-android ./python-for-android
[app]

\# (str) Title of your application
title = APP
\# (str) Package name
package.name = test

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

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

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

\# (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.regex = __version__ = '(.*)'
\#version.filename = %(source.dir)s/main.py

\# (str) Application versioning (method 2)
version = 0.0.1

\# (list) Application requirements
requirements = kivy

\# (str) Presplash of the application
presplash.filename = ../data/presplash.png

\# (str) Icon of the application
icon.filename = ../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

\# (int) Android API to use
android.api = 19

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

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

\# (str) Android NDK version to use
android.ndk = 9d

\# (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 = ./android-ndk-r9d

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

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

\# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.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 = <TODO>

\# (list) Android additionnal libraries to copy into libs/armeabi
\#android.add_libs_armeabi = libs/android/*.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 = <TODO>

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


[buildozer]

\# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 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

[kuldeep@localhost android]$ ls -la
total 44
drwxrwxr-x.  8 kuldeep kuldeep 4096 Mar 24 17:57 .
drwxrwxr-x.  8 kuldeep kuldeep 4096 Mar 24 17:32 ..
drwxr-xr-x. 10 kuldeep kuldeep 4096 Mar  1 06:27 android-ndk-r9d
drwxrwxr-x.  8 kuldeep kuldeep 4096 Mar 20 19:11 android-sdk-linux
drwxrwxr-x.  2 kuldeep kuldeep 4096 Mar 24 17:12 bin
drwxrwxr-x.  4 kuldeep kuldeep 4096 Mar 24 17:12 .buildozer
-rw-rw-r--.  1 kuldeep kuldeep 5131 Mar 24 17:55 buildozer.spec
-rw-rw-r--.  1 kuldeep kuldeep  224 Mar 24 17:57 Makefile
drwxrwxr-x. 10 kuldeep kuldeep 4096 Mar 24 17:04 python-for-android
drwxrwxr-x.  3 kuldeep kuldeep 4096 Mar 24 17:10 waste-directory-tmp
[kuldeep@localhost android]$ ls -la ..
total 36
drwxrwxr-x. 8 kuldeep kuldeep 4096 Mar 24 17:32 .
drwxrwxr-x. 7 kuldeep kuldeep 4096 Mar 20 23:25 ..
drwxrwxr-x. 8 kuldeep kuldeep 4096 Mar 24 17:57 android
drwxrwxr-x. 3 kuldeep kuldeep 4096 Mar 24 15:30 app
drwxrwxr-x. 2 kuldeep kuldeep 4096 Mar 24 14:47 app-old
drwxr-xr-x. 2 kuldeep kuldeep 4096 Mar 20 22:01 data
-rw-rw-r--. 1 kuldeep kuldeep  235 Mar 24 14:11 INSTALL
drwxrwxr-x. 4 kuldeep kuldeep 4096 Mar 24 13:57 libs
drwxrwxr-x. 2 kuldeep kuldeep 4096 Mar 24 17:31 old-make
[kuldeep@localhost android]$ 

fcntl import error

I think fcntl isnt available for windows and is only available for linuxes

support blacklist changes in python-for-android

I can edit .buildozer/android/platform/python-for-android/dist/default/blacklist.txt and remove _csv from the blacklisted things, but it will be there again if anything trigger the re-creation of the distribution, a new option in the android target may be needed, unless someone think of a more elegant solution.

add an ssh target

Sometime using adb is not convenient, and with an ssh-server installed on the android device, it's possible to do everything adb can do, allowing to configure such things could be useful, one needs

an ssh server on the device (dropbear is great)
an ssh key added to the ssh server, so the connection is transparent (optional)
a dump of the adb shell "env" command, so everything happens correctly (i usually put this in /sdcard/adb_env)
the ip of the server

then, the apk can be copied other with a command like
tar -c $apk |ssh root@device_ip 'cd /sdcard/ && tar -x'

and the apk can be installed with

ssh root@device_ip "source /sdcard/adb_env &&\
pm uninstall $package_name &&\
pm install /sdcard/$apk"

and the activity started with
`am start -n $package_name/org.renpy.android.PythonActivity -a o rg.renpy.android.PythonActivity"``

Assuming adb_env is loaded too.

If nobody does, i'll try to do that at some point in the future, if someone wants to do it before, i can help :)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Zlib still giving issues on Ubuntu 13.04

previous ticket was closed, running Zorin distribution of Ubuntu,

ccache gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/compile.o Python/compile.c
ccache gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/graminit.o Python/graminit.c
ccache gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/symtable.o Python/symtable.c
ccache gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
ccache gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -DPYTHONPATH='":plat-linux3:lib-tk:lib-old"'
-DPREFIX='"/usr/local"'
-DEXEC_PREFIX='"/usr/local"'
-DVERSION='"2.7"'
-DVPATH='""'
-o Modules/getpath.o ./Modules/getpath.c
ccache gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -I/usr/local/include -c ./Modules/zlibmodule.c -o Modules/zlibmodule.o
./Modules/zlibmodule.c:8:18: fatal error: zlib.h: No such file or directory
compilation terminated.

Custom activity

Is it possible to include a custom activity in the buildozer.spec file? How is the syntax?

Where are custom python-for-android recipes meant to go?

Tried adding a recipe in .buildozer/android/platform/python-for-android/recipes but buildozer runs a git clean on the python-for-android install before every build which deletes it.

What is the intended method for adding custom recipes?

buildozer on ios fails at: Command failed: tools/build-all.sh

I am testing buildozer on Mac OS 10.7.5

buildozer ios debug deploy fails when compiling kivy.

I raised the log_level to 2, and got the following traceback:

~/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/kivy-ios/src/ios ~/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/kivy-ios
-- cythonize ['/Users/james/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/kivy-ios/tools/cythonize.py', 'ios.pyx']
cythonize: ios.pyx
Traceback (most recent call last):
  File "/Users/james/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/kivy-ios/tools/cythonize.py", line 47, in <module>
    do(fn)
  File "/Users/james/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/kivy-ios/tools/cythonize.py", line 16, in do
    subprocess.Popen(['cython', fn]).communicate()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
# Command failed: tools/build-all.sh

buildozer ios debug deploy fails on running fruitstrap at 70% with error AMDeviceInstallApplication failed

[ 49%] Copying app-bob_the_hamster_dirt_dig/build/Debug-iphoneos/bob_the_hamster_dirt_dig.app/YourApp/tilemap.pyo to device
[ 49%] Copying app-bob_the_hamster_dirt_dig/build/Debug-iphoneos/bob_the_hamster_dirt_dig.app/YourApp/units.pyo to device
[ 49%] Copying app-bob_the_hamster_dirt_dig/build/Debug-iphoneos/bob_the_hamster_dirt_dig.app/YourApp/util.pyo to device
[ 50%] TakingInstallLock
[ 52%] CreatingStagingDirectory
[ 57%] ExtractingPackage
[ 60%] InspectingPackage
[ 65%] PreflightingApplication
[ 70%] VerifyingApplication
AMDeviceInstallApplication failed: -402653056
# Command failed: /Users/james/src/secrethamster/kivy/bobdirt/.buildozer/ios/platform/fruitstrap/fruitstrap -d -b app-bob_the_hamster_dirt_dig/build/Debug-iphoneos/bob_the_hamster_dirt_dig.app

Error importing _scproxy

My application seems to crash when I add 'requests' as a a requirement.

In buildozer.spec:

requirements = requests,kivy

And output from logcat:

I/python  ( 5771): [INFO   ] Kivy v1.7.2
I/python  ( 5771): [INFO   ] [Logger      ] Record log in /data/data/com.edtitan.edtitan/files/.kivy/logs/kivy_13-12-18_3.txt
I/python  ( 5771): [INFO   ] [Factory     ] 144 symbols loaded
I/python  ( 5771): [DEBUG  ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
I/System.out(16321): close [socket][/0.0.0.0:-1]
I/python  ( 5771): [DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60s
I/python  ( 5771): [DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
I/python  ( 5771):  /data/data/com.edtitan.edtitan/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:11: RuntimeWarning: import cdrom: No module named cdrom
I/python  ( 5771):  (ImportError: No module named cdrom)
I/python  ( 5771): [INFO   ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
I/python  ( 5771): [DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
I/python  ( 5771): [DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
I/python  ( 5771):  Traceback (most recent call last):
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/main.py", line 7, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/edtitan/connection.py", line 1, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/_applibs/requests/__init__.py", line 58, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/_applibs/requests/utils.py", line 12, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/platform/python-for-android/dist/default/private/lib/python2.7/cgi.py", line 40, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/platform/python-for-android/dist/default/private/lib/python2.7/urllib.py", line 1360, in <module>
I/python  ( 5771):  ImportError: No module named _scproxy
I/python  ( 5771): Python for android ended.

I noticed a fix for a similar error in kivy-ios here:

kivy/kivy-ios@6a1e722

Update: I am on a Mac and this may be a Mac-build-specific issue.

Default android.sdk setting causes sensor rotate on Android to fail

The default android.sdk setting of 21 causes sensor-based rotatation to fail on Android due to python-for-android issue kivy/python-for-android#148

Ideally, we should fix this by fixing the py4a issue.

Right now you cannot work around this issue because buildozer uses the android.sdk option to both determine which SDK to download and use to compile and to determine what gets sent to py4a's build.py as the --sdk value. These two things should be separated so that you can compile with one SDK (21) but target another (12). More information about this topic can be found at http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Error when running: buildozer --verbose android debug deploy run

Edit: I am running 64 bit Ubuntu 12.04

I followed the guide from here: http://kivy.org/docs/guide/packaging-android.html

I am trying to compile the example pong app. Here is my buildozer.spec sheet
http://pastebin.com/R7uwpdtd

When I run buildozer --verbose android debug deploy run It gives the following errors:

Error: Target id 'android-14' is not valid. Use 'android list targets' to get the target ids.
BUILD FAILED
/home/user/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:399: SDK Platform Tools component is missing. Please install it with the SDK Manager (tools/android)
Total time: 0 seconds
Traceback (most recent call last):
  File "build.py", line 412, in <module>
    make_package(args)
  File "build.py", line 336, in make_package
    subprocess.check_call([ANT, arg])
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
...


x86 apk support on buildozer

I created an APK using python-for-android and tried running it on an x86 emulator.
It crashed with the following error:

E/AndroidRuntime( 1707): java.lang.UnsatisfiedLinkError: Couldn't load sdl from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.amitkot.pong-1.apk,libraryPath=/data/app-lib/com.amitkot.pong-1]: findLibrary returned null

Talking on the IRC channel, it seems the APK wasn't supposed to have code for x86 devices. As these devices will (probably) become more common, supporting them could be very helpful.

DBAccessError permission denied in app

Having successfully built and pushed the app to my phone, a Samsung Galaxy Nexus (maguro, GSM version), the app displays a kivy loading screen before crashing. The logcat, from buildozer android logcat, is as follows:

Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 5, in <module>
    run()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1195, in run
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 833, in run_command
    self.set_target(command)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 121, in set_target
    self.check_build_layout()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 351, in check_build_layout
    self.state = shelve.open(join(self.buildozer_dir, 'state.db'))
  File "/usr/lib/python2.7/shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python2.7/shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBAccessError: (13, 'Permission denied')

There are currently no read/write operations in my app; I commented them out for testing purposes. Furthermore, I have given the permissions READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE in the buildozer.spec, just in case.

buildozer ios debug build fails on MacOS Mavericks

I'm not sure if this is an OS flaw or a missing/invalid dependency, but when I try to build my Kivy app for ios, I get an error:

~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/build/python/lib
~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/src/ios ~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios
-- cythonize ['/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tools/cythonize.py', 'ios.pyx']
cythonize: ios.pyx
no need to rewrite ios.pyx
running build_ext
building 'ios' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/build/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3 -arch i386 -arch x86_64 -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1 -c ios.c -o build/temp.macosx-10.9-intel-2.7/ios.o
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/cdefs.h:655:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
#error architecture not supported
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:67:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:67:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:94:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:95:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:96:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:99:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:100:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:101:9: error: unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:107:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:109:9: error: unknown type name '__uint16_t'
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:110:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:111:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:131:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:132:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:133:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:134:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:71:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you mean '__builtin_va_list'?
typedef __darwin_va_list va_list;
        ^
note: '__builtin_va_list' declared here
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:72:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t        size_t;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:103:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t;        /* [???] Used for inodes */
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit status 1
# Command failed: tools/build-all.sh

This looks to me like a missing dependency or invalid compiler version, so here's mine:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Any ideas to solve would be most welcome!

32-bit SDK installed on 64-bit system

buildozer android release
fails due to missing libstdc++6 required by aidl.

After consulting stackoverflow,
objdump -x /home/sarim/.buildozer/android/platform/android-sdk-21/platform-tools/aidl | grep NEED
shows that 32-bit libraries are required by the Android SDK.

Workaround: sudo apt-get install libc6:i386 libstdc++6:i386
(Ubuntu 13.10, 64-bit)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.