kivy / buildozer

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

python kivy to apk conversion buildozer error #1780

Closed GovindaPd closed 9 months ago

GovindaPd commented 9 months ago

Versions

build.yml

name: Build on: push: branches-ignore:

jobs:

Build job. Builds app for Android with Buildozer

build-android: name: Build for Android runs-on: ubuntu-20.04

ubuntu-20.04

steps:
  - name: Checkout
    uses: actions/checkout@v2
    with:
      path: master

  - name: Build with Buildozer
    uses: ArtemSBulgakov/buildozer-action@v1
    id: buildozer
    with:
      repository_root: master
      workdir: .
      buildozer_version: stable

  - name: Upload artifacts
    uses: actions/upload-artifact@v2
    with:
      name: package
      path: ${{ steps.buildozer.outputs.filename }}

  - name: Checkout
    uses: actions/checkout@v2
    with:
      path: data
      ref: data # Branch name

  - name: Set up Python
    uses: actions/setup-python@v2
    with:
      python-version: 3.9
      architecture: x64

  - name: Push binary to data branch
    if: github.event_name == 'push'
    run: python master/.ci/move_binary.py "${{ steps.buildozer.outputs.filename }}" master data bin

// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?

buildozer.spec

Command:

[app]

(str) Title of your application

title = Chess

(str) Package name

package.name = ChessPlay

(str) Package domain (needed for android/ios packaging)

package.domain = org.govindapd

(str) Source code where the main.py live

source.dir = .

(list) Source files to include (let empty to include all the files)

source.include_exts = py,png,jpg,kv,atlas,ttf

(list) List of inclusions using pattern matching

source.include_patterns = assets/,images/.png

(list) Source files to exclude (let empty to not exclude anything)

source.exclude_exts = spec

(list) List of directory to exclude (let empty to not exclude anything)

source.exclude_dirs = tests, bin, venv

(list) List of exclusions using pattern matching

source.exclude_patterns = license,images//.jpg

(str) Application versioning (method 1)

version = 0.1

(str) Application versioning (method 2)

version.regex = version = '"['"]

version.filename = %(source.dir)s/main.py

(list) Application requirements

comma separated e.g. requirements = sqlite3,kivy

requirements = Python==3.9, Kivy==2.3.0, pillow, SDL2, Cython==3.0.8

(str) Custom source folders for requirements

Sets custom source for any requirements with recipes

requirements.source.kivy = ../../kivy

(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

icon.filename = %(source.dir)s/images/appicon.png

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

orientation = portrait

(list) List of service to declare

services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#

OSX Specific

#

#

author = © Copyright Info

change the major version of python used by the app

osx.python_version = 3.9

Kivy version to use

osx.kivy_version = 2.3.0

#

Android specific

#

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

fullscreen = 0

(string) Presplash background color (for new android toolchain)

Supported formats are: #RRGGBB #AARRGGBB or one of the following names:

red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,

darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,

olive, purple, silver, teal.

android.presplash_color = #FFFFFF

(list) Permissions

android.permissions = INTERNET

(int) Target Android API, should be as high as possible.

android.api = 31

(int) Minimum API your APK will support.

android.minapi = 21

(int) Android SDK version to use

android.sdk = 28

(str) Android NDK version to use

android.ndk = 19b

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

android.ndk_api = 28

(bool) Use --private data storage (True) or --dir public storage (False)

android.private_storage = True

(str) Android NDK directory (if empty, it will be automatically downloaded.)

android.ndk_path =

(str) Android SDK directory (if empty, it will be automatically downloaded.)

android.sdk_path =

(str) ANT directory (if empty, it will be automatically downloaded.)

android.ant_path =

(bool) If True, then skip trying to update the Android sdk

This can be useful to avoid excess Internet downloads or save time

when an update is due and you just want to test/build your package

android.skip_update = False

(bool) If True, then automatically accept SDK license

agreements. This is intended for automation only. If set to False,

the default, you will be shown the license when first running

buildozer.

android.accept_sdk_license = False

(str) Android entry point, default is ok for Kivy-based app

android.entrypoint = org.renpy.android.PythonActivity

(str) Android app theme, default is ok for Kivy-based app

android.apptheme = "@android:style/Theme.NoTitleBar"

(list) Pattern to whitelist for the whole project

android.whitelist =

(str) Path to a custom whitelist file

android.whitelist_src =

(str) Path to a custom blacklist file

android.blacklist_src =

(list) List of Java .jar files to add to the libs so that pyjnius can access

their classes. Don't add jars that you do not need, since extra jars can slow

down the build process. Allows wildcards matching, for example:

OUYA-ODK/libs/*.jar

android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

(list) List of Java files to add to the android project (can be java or a

directory containing the files)

android.add_src =

(list) Android AAR archives to add (currently works only with sdl2_gradle

bootstrap)

android.add_aars =

(list) Gradle dependencies to add (currently works only with sdl2_gradle

bootstrap)

android.gradle_dependencies =

(list) add java compile options

this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option

see https://developer.android.com/studio/write/java8-support for further information

android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"

(list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}

please enclose in double quotes

e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"

android.add_gradle_repositories =

(list) packaging options to add

see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html

can be necessary to solve conflicts in gradle_dependencies

please enclose in double quotes

e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"

android.add_gradle_repositories =

(list) Java classes to add as activities to the manifest.

android.add_activities = com.example.ExampleActivity

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

android.manifest.intent_filters =

(str) launchMode to set for the main activity

android.manifest.launch_mode = standard

(list) Android additional libraries to copy into libs/armeabi

android.add_libs_armeabi = libs/android/*.so

android.add_libs_armeabi_v7a = libs/android-v7/*.so

android.add_libs_arm64_v8a = libs/android-v8/*.so

android.add_libs_x86 = libs/android-x86/*.so

android.add_libs_mips = libs/android-mips/*.so

(bool) Indicate whether the screen should stay on

Don't forget to add the WAKE_LOCK permission if you set this to True

android.wakelock = False

(list) Android application meta-data to set (key=value format)

android.meta_data =

(list) Android library project to add (will be added in the

project.properties automatically.)

android.library_references =

(list) Android shared libraries which will be added to AndroidManifest.xml using tag

android.uses_library =

(str) Android logcat filters to use

android.logcat_filters = *:S python:D

(bool) Copy library instead of making a libpymodules.so

android.copy_libs = 1

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

android.arch = armeabi-v7a

android.archs = armeabi-v7a

(int) overrides automatic versionCode computation (used in build.gradle)

this is not the same as app version and should only be edited if you know what you're doing

android.numeric_version = 1

#

Python for android (p4a) specific

#

(str) python-for-android fork to use, defaults to upstream (kivy)

p4a.fork = kivy

(str) python-for-android branch to use, defaults to master

p4a.branch = master #release-2022.12.20

p4a.branch = develop

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

p4a.source_dir =

(str) The directory in which python-for-android should look for your own build recipes (if any)

p4a.local_recipes =

(str) Filename to the hook for p4a

p4a.hook =

(str) Bootstrap to use for android builds

p4a.bootstrap = sdl2

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

p4a.port =

#

iOS specific

#

(str) Path to a custom kivy-ios folder

ios.kivy_ios_dir = ../kivy-ios

Alternately, specify the URL and branch of a git checkout:

ios.kivy_ios_url = https://github.com/kivy/kivy-ios ios.kivy_ios_branch = master

Another platform dependency: ios-deploy

Uncomment to use a custom checkout

ios.ios_deploy_dir = ../ios_deploy

Or specify URL and branch

ios.ios_deploy_url = https://github.com/phonegap/ios-deploy ios.ios_deploy_branch = 1.10.0

(bool) Whether or not to sign the code

ios.codesign.allowed = false

(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: ()"

(str) Name of the certificate to use for signing the release version

ios.codesign.release = %(ios.codesign.debug)s

[buildozer]

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

log_level = 2

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

warn_on_root = 1

(str) Path to build artifact storage, absolute or relative to spec file

build_dir = ./.buildozer

(str) Path to build output (i.e. .apk, .ipa) storage

bin_dir = ./bin

-----------------------------------------------------------------------------

List as sections

#

You can define all the "list" as [section:key].

Each line will be considered as a option to the list.

Let's take [app] / source.exclude_patterns.

Instead of doing:

#

[app]

source.exclude_patterns = license,data/audio/.wav,data/images/original/

#

This can be translated into:

#

[app:source.exclude_patterns]

license

data/audio/*.wav

data/images/original/*

#

-----------------------------------------------------------------------------

Profiles

#

You can extend section / key with a profile

For example, you want to deploy a demo version of your application without

HD content. You could first change the title to add "(demo)" in the name

and extend the excluded directories to remove the HD content.

#

[app@demo]

title = My Application (demo)

#

[app:source.exclude_patterns@demo]

images/hd/*

#

Then, invoke the command line with the "demo" profile:

#

buildozer --profile demo android debug

Logs

STDOUT: warning: [options] bootstrap class path not set in conjunction with -source 8 1 warning running build_ext building 'jnius' extension creating build creating build/temp.linux-x86_64-3.11 creating build/temp.linux-x86_64-3.11/jnius /usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -I/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/ChessPlay/armeabi-v7a/include/python3.1 -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/github/workspace/master/.buildozer/android/p clang-14: error: no such file or directory: 'jnius/jnius.c' clang-14: error: no input files error: command '/usr/bin/ccache' failed with exit code 1 STDERR: INFO: pyjnius first build failed (as expected) INFO: Running cython where appropriate INFO: Cythonize jnius/jnius.pyx stty: 'standard input': Inappropriate ioctl for device DEBUG: -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./jnius/jnius.pyx DEBUG: /home/user/.local/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-sdl2/armeabi-v7andk_target_21/pyjnius/jnius/jnius.pyx DEBUG: tree = Parsing.p_module(s, pxd, full_module_name) stty: 'standard input': Inappropriate ioctl for device DEBUG: -> running python3 setup.py build_ext -v DEBUG: warning: [options] bootstrap class path not set in conjunction with -source 8 DEBUG: 1 warning DEBUG: running build_ext DEBUG: building 'jnius' extension DEBUG: /usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7andk_target_21/python3/Include -DANDROID -I/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/ChessPlay/armeabi-v7a/include/python3.1 -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/github/workspa DEBUG: jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found

DEBUG: 1 error generated. DEBUG: error: command '/usr/bin/ccache' failed with exit code 1 Exception in thread background thread for pid 45203: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, *self._kwargs) File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 1637, in wrap fn(rgs, **kwargs) File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 2561, in background_thread handle_exit_code(exit_code) File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 2265, in fn return self.command.handle_command_exit_code(exit_code) File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v STDOUT: warning: [options] bootstrap class path not set in conjunction with -source 8 1 warning running build_ext building 'jnius' extension /usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -I/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/ChessPlay/armeabi-v7a/include/python3.1 -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/github/workspace/master/.buildozer/android/p jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found

include "longintrepr.h"

       ^~~~~~~~~~~~~~~

1 error generated. error: command '/usr/bin/ccache' failed with exit code 1 STDERR:

warning: [options] bootstrap class path not set in conjunction with -source 8   

1 warning
running build_ext
building 'jnius' extension
/usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -I/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/ChessPlay/armeabi-v7a/include/python3.1 -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/github/workspace/master/.buildozer/android/p jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found

include "longintrepr.h"

       ^~~~~~~~~~~~~~~  

1 error generated.
error: command '/usr/bin/ccache' failed with exit code 1

export HOME='/home/user' export CFLAGS='-target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7andk_target_21/python3/Include' export CXXFLAGS='-target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC' export CPPFLAGS='-DANDROID -I/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/ChessPlay/armeabi-v7a/include/python3.1' export LDFLAGS=' -L/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/libs_collections/ChessPlay/armeabi-v7a -L/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7andk_target_21/python3/android-build -lpython3.11 -L/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/libs_collections/ChessPlay/armeabi-v7a -L/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/libs_collections/ChessPlay -L/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2/obj/local/armeabi-v7a ' export LDLIBS='-lm' export USE_CCACHE='1' export NDK_CCACHE='/usr/bin/ccache' export PATH='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin:/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b:/github/workspace/master/.buildozer_global/android/platform/android-sdk/tools:/github/workspace/master/.buildozer_global/android/platform/apache-ant-1.9.4/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' export CC='/usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC' export CXX='/usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC' export AR='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar' export RANLIB='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib' export STRIP='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded' export READELF='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf' export OBJCOPY='/github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy' export MAKE='make -j4' export ARCH='armeabi-v7a' export NDK_API='android-21' export LDSHARED='/usr/bin/ccache /github/workspace/master/.buildozer_global/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -shared' export BUILDLIB_PATH='/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.11' export PYTHONNOUSERSITE='1' export LANG='en_GB.UTF-8' export PYTHONPATH='/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib:/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages:/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/temp.linux-x86_64-3.11:/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.11:/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/scripts-3.11' export LIBLINK='NOTNONE' export COPYLIBS='1' export LIBLINK_PATH='/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-sdl2/armeabi-v7a__ndk_target_21/objects_pyjnius' export NDKPLATFORM='NOTNONE'

cd /github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-sdl2/armeabi-v7a__ndk_target_21/pyjnius && /github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v [WARNING]: ERROR: /github/workspace/master/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 failed!

Command failed: ['/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=ChessPlay', '--bootstrap=sdl2', '--requirements=Python==3.9 Kivy==2.3.0,pillow,SDL2,Cython==3.0.8', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/github/workspace/master/.buildozer/android/platform/build-armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

ENVIRONMENT:

Sytse45 commented 9 months ago

I can confirm the fatal error "jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found" when trying to generate an apk for the most simple kivy app I could find: the pong game (the first two code snippets - main.py and pong.kivy) from https://kivy.org/doc/stable/tutorials/pong.html. On https://stackoverflow.com/questions/74979674/gensim-install-in-python-3-11-fails-because-of-missing-longintrepr-h-file the error is attributed to the use of python 3.11.

github-actions[bot] commented 9 months ago

👋 @GovindaPd, Sorry to hear you are having difficulties with Kivy's Buildozer; Kivy unites a number of different technologies, so building apps can be temperamental. We try to use GitHub issues only to track work for developers to do to fix bugs and add new features to Buildozer. This issue has been closed, because it doesn't describe a bug or new feature request for Buildozer. There is a mailing list and a Discord channel to support Kivy users debugging their own systems, which should be able to help. They are linked in the ReadMe. Of course, if it turns out you have stumbled over a bug in Buildozer, we do want to hear about it here. The support channels should be able to help you craft an appropriate bug report.

GovindaPd commented 9 months ago

I can confirm the fatal error "jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found" when trying to generate an apk for the most simple kivy app I could find: the pong game (the first two code snippets - main.py and pong.kivy) from https://kivy.org/doc/stable/tutorials/pong.html. On https://stackoverflow.com/questions/74979674/gensim-install-in-python-3-11-fails-because-of-missing-longintrepr-h-file the error is attributed to the use of python 3.11.

yeh i tried with simple app with python version 3.7 that work but heigher version has some file missing errors.

kds215 commented 8 months ago

I have the same missing file error multiple times "jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found" when running: (kivy_venv) klaus@iMac navikey-android % buildozer -v android debug on macOS 12.73; buildozer 1.5.0; kivy 1.11.1; python 3.6.7;

The section in the log that starts the trouble: INFO: Trying first build of pyjnius to get cython files: this is expected to fail ... [DEBUG]: creating build/temp.macosx-12.7-x86_64-3.11/jnius [DEBUG]: /Users/klaus/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -I/Users/klaus/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/takepicture/armeabi-v7a/include/python3.1 -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.macosx-12.7-x86_64-3.11/jnius/jnius.o [DEBUG]: clang-14: error: no such file or directory: 'jnius/jnius.c' ... INFO: pyjnius first build failed (as expected) INFO: Running cython where appropriate INFO: Cythonize jnius/jnius.pyx ...

warning: [options] bootstrap class path not set in conjunction with -source 8   

1 warning
running build_ext
building 'jnius' extension
/Users/klaus/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -I/Users/klaus/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/takepicture/armeabi-v7a/include/python3.1 -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/Users/klaus/DevTools/PythonDev/Kivy/navikey-android/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.macosx-12.7-x86_64-3.11/jnius/jnius.o
jnius/jnius.c:196:12: fatal error: 'longintrepr.h' file not found

include "longintrepr.h"

       ^~~~~~~~~~~~~~~  

1 error generated.
error: command '/Users/klaus/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang' failed with exit code 1

Julian-O commented 7 months ago

Please take it to the support channels, listed above.

kds215 commented 7 months ago

thanks, but unresolved Kivy issues are not on my radar screen anymore.