GithubHelp home page GithubHelp logo

Comments (18)

RobertFlatt avatar RobertFlatt commented on August 21, 2024

Cython: 3.0.4

Most people use Buildozer, see the Buildozer install instructions for Cython version (and other dependencies).
https://github.com/kivy/buildozer/blob/master/docs/source/installation.rst#targeting-android

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

tried buildozer too, just right now

buildozer init
buildozer android release
...

[INFO]:    Python package already exists in site-packages
[INFO]:    six said it is already built, skipping
[INFO]:    Building pyjnius for arm64-v8a
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius
[DEBUG]:   -> running python3 -c import sys; print(sys.path)
[DEBUG]:   	['', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/scripts-3.10', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/temp.linux-x86_64-3.10', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.10', '/usr/local/lib/python310.zip', '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib']
[DEBUG]:   cwd is /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[DEBUG]:   -> running python3 setup.py build_ext -v
[DEBUG]:   	warning: [options] bootstrap class path not set in conjunction with -source 7
[DEBUG]:   	error: Source option 7 is no longer supported. Use 8 or later.
[DEBUG]:   	error: Target option 7 is no longer supported. Use 8 or later.
[DEBUG]:   	Traceback (most recent call last):
[DEBUG]:   	  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/setup.py", line 83, in <module>
[DEBUG]:   	    compile_native_invocation_handler(JAVA)
[DEBUG]:   	  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/setup.py", line 73, in compile_native_invocation_handler
[DEBUG]:   	    subprocess.check_call([
[DEBUG]:   	  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/subprocess.py", line 369, in check_call
[DEBUG]:   	    raise CalledProcessError(retcode, cmd)
[DEBUG]:   	subprocess.CalledProcessError: Command '['/usr/lib/jvm/java-21-openjdk/bin/javac', '-target', '1.7', '-source', '1.7', 'jnius/src/org/jnius/NativeInvocationHandler.java']' returned non-zero exit status 2.
Exception in thread background thread for pid 44927:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_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 7
error: Source option 7 is no longer supported. Use 8 or later.
error: Target option 7 is no longer supported. Use 8 or later.
Traceback (most recent call last):
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/setup.py", line 83, in <module>
    compile_native_invocation_handler(JAVA)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/setup.py", line 73, in compile_native_invocation_handler
    subprocess.check_call([
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/lib/jvm/java-21-openjdk/bin/javac', '-target', '1.7', '-source', '1.7', 'jnius/src/org/jnius/NativeInvocationHandler.java']' returned non-zero exit status 2.


  STDERR:

[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[DEBUG]:   -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./jnius/jnius.pyx
[DEBUG]:   	/usr/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/jnius/jnius.pyx
[DEBUG]:   	  tree = Parsing.p_module(s, pxd, full_module_name)
[DEBUG]:   	
[DEBUG]:   	Error compiling Cython file:
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	...
[DEBUG]:   	import sys
[DEBUG]:   	import traceback
[DEBUG]:   	
[DEBUG]:   	include "jnius_compat.pxi"
[DEBUG]:   	include "jni.pxi"
[DEBUG]:   	include "config.pxi"
[DEBUG]:   	^
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	jnius/jnius.pyx:100:0: 'config.pxi' not found
[DEBUG]:   	warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
[DEBUG]:   	
[DEBUG]:   	Error compiling Cython file:
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	...
[DEBUG]:   	
[DEBUG]:   	include "jnius_compat.pxi"
[DEBUG]:   	include "jni.pxi"
[DEBUG]:   	include "config.pxi"
[DEBUG]:   	
[DEBUG]:   	IF JNIUS_PLATFORM == "android":
[DEBUG]:   	   ^
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	jnius/jnius.pyx:102:3: Compile-time name 'JNIUS_PLATFORM' not defined
[DEBUG]:   	
[DEBUG]:   	Error compiling Cython file:
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	...
[DEBUG]:   	include "jni.pxi"
[DEBUG]:   	include "config.pxi"
[DEBUG]:   	
[DEBUG]:   	IF JNIUS_PLATFORM == "android":
[DEBUG]:   	    include "jnius_jvm_android.pxi"
[DEBUG]:   	ELIF JNIUS_PLATFORM == "win32":
[DEBUG]:   	     ^
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	jnius/jnius.pyx:104:5: Compile-time name 'JNIUS_PLATFORM' not defined
[DEBUG]:   	
[DEBUG]:   	Error compiling Cython file:
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	...
[DEBUG]:   	include "config.pxi"
[DEBUG]:   	^
[DEBUG]:   	------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	jnius/jnius_jvm_dlopen.pxi:1:0: 'config.pxi' not found
[DEBUG]:   	
Exception in thread background thread for pid 44951:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/python3 '-cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());' ./jnius/jnius.pyx

  STDOUT:
/usr/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/jnius/jnius.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
import sys
import traceback

include "jnius_compat.pxi"
include "jni.pxi"
include "config.pxi"
^
------------------------------------------------------------

jnius/jnius.pyx:100:0: 'config.pxi' not found
warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

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

include "jnius_compat.pxi"
include "jni.pxi"
include "config.pxi"

IF JNIUS_PLATFORM == "android":
   ^
------------------------------------------------------------

jnius/jnius.pyx:102:3: Compile-time name 'JNIUS_PLATFORM' not defined

Error compiling Cython file:
------------------------------------------------------------
...
include "jni.pxi"
include "config.pxi"

IF JNIUS_PLATFORM == "android":
    include "jnius_jvm_android.pxi"
ELIF JNIUS_PLATFORM == "win32":
     ^
------------------------------------------------------------

jnius/jnius.pyx:104:5: Compile-time name 'JNIUS_PLATFORM' not defined

Error compiling Cython file:
------------------------------------------------------------
...
include "config.pxi"
^
------------------------------------------------------------

jnius/jnius_jvm_dlopen.pxi:1:0: 'config.pxi' not found



  STDERR:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1262, in <module>
    main()
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 680, in __init__
    getattr(self, command)(args)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 99, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 158, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
    recipe.build_arch(arch)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1028, in build_arch
    self.build_cython_components(arch)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1053, in build_cython_components
    self.cythonize_build(env=env)
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1101, in cythonize_build
    self.cythonize_file(env, build_dir, join(root, filename))
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1090, in cythonize_file
    shprint(python_command, "-c"
  File "/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 915, in next
    self.wait()
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 845, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/xou/.local/lib/python3.11/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/python3 '-cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());' ./jnius/jnius.pyx

  STDOUT:
/usr/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/jnius/jnius.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
import sys
import traceback

include "jnius_compat.pxi"
include "jni.pxi"
include "config.pxi"
^
------------------------------------------------------------

jnius/jnius.pyx:100:0: 'config.pxi' not found
warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

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

include "jnius_compat.pxi"
include "jni.pxi"
include "config.pxi"

IF JNIUS_PLATFORM == "android":
   ^
------------------------------------------------------------

jnius/jnius.pyx:102:3: Compile-time name 'JNIUS_PLATFORM' not defined

Error compiling Cython file:
------------------------------------------------------------
...
include "jni.pxi"
include "config.pxi"

IF JNIUS_PLATFORM == "android":
    include "jnius_jvm_android.pxi"
ELIF JNIUS_PLATFORM == "win32":
     ^
------------------------------------------------------------

jnius/jnius.pyx:104:5: Compile-time name 'JNIUS_PLATFORM' not defined

Error compiling Cython file:
------------------------------------------------------------
...
include "config.pxi"
^
------------------------------------------------------------

jnius/jnius_jvm_dlopen.pxi:1:0: 'config.pxi' not found



  STDERR:

...

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

Also

pip install jnius
Defaulting to user installation because normal site-packages is not writeable
Collecting jnius
  Downloading jnius-1.1.0.tar.gz (28 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: six>=1.7.0 in /usr/lib/python3.11/site-packages (from jnius) (1.16.0)
Requirement already satisfied: cython in /usr/lib/python3.11/site-packages (from jnius) (3.0.4)
Building wheels for collected packages: jnius
  Building wheel for jnius (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      copying jnius_config.py -> build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/jnius
      copying jnius/reflect.py -> build/lib.linux-x86_64-cpython-311/jnius
      copying jnius/__init__.py -> build/lib.linux-x86_64-cpython-311/jnius
      copying jnius/signatures.py -> build/lib.linux-x86_64-cpython-311/jnius
      running build_ext
      Compiling jnius/jnius.pyx because it changed.
      [1/1] Cythonizing jnius/jnius.pyx
      /usr/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-bn3fs_73/jnius_4241c1ca4fc54339b3ee6c0e3f0230ec/jnius/jnius.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      warning: jnius/jnius.pyx:100:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/jnius_jvm_dlopen.pxi:48:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: jnius/jnius.pyx:111:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      building 'jnius' extension
      error: unknown file type '.pxi' (from 'jnius/jni.pxi')
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for jnius
  Running setup.py clean for jnius
Failed to build jnius
ERROR: Could not build wheels for jnius, which is required to install pyproject.toml-based projects

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

Also downgrading to cython 0.29.36 allows me to pip install jnius successfully, but buildozer android release still fails the same way (Althought I don't know if this has to do anything with the original error)

from python-for-android.

RobertFlatt avatar RobertFlatt commented on August 21, 2024

Perhaps an appclean?
https://github.com/Android-for-Python/Android-for-Python-Users#changing-buildozerspec

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

I didn't change anything in buildozer.spec but I appcleaned anyways... nothing was fixed

from python-for-android.

HyTurtle avatar HyTurtle commented on August 21, 2024

That openjdk version would need to be updated, the currently recommended version is 17

from python-for-android.

RobertFlatt avatar RobertFlatt commented on August 21, 2024

And the build must be cleaned when the dependencies change too.

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

@HyTurtle Interestingly it show that error I mentioned, while I have already switched to:

openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

So to update:

Versions

  • Python: 3.11.5
  • OS: Arch Linux x86_64
  • Kivy: v2.2.1
  • Cython: 0.29.36
  • OpenJDK: 21 2023-09-19

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

extra info:

  STDERR:


# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=myapp', '--bootstrap=sdl2', '--requirements=python3,kivy', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
...
#     PATH = '/home/xou/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/xou/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/android-sdk/platform-tools:/opt/flutter/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl'
#     PWD = '/home/xou/Desktop/xou/programming/python/trash/tst_android_kivy'
...
#     PACKAGES_PATH = '/home/xou/.buildozer/android/packages'
#     ANDROIDSDK = '/home/xou/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/xou/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '31'
#     ANDROIDMINAPI = '21'
...

from python-for-android.

HyTurtle avatar HyTurtle commented on August 21, 2024

Personally I would run with the recommended version - at least to get a consistent build env to start, though here first run a build with ndk 25b, as you are using 26b.

Would also question if you were getting the exact same error on a fresh build with those changes

Okay; you have ran with 25b there, though any build error there would be in the log above that section (and would still suggest jdk 17)

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

I will install 17 and I will retry

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

Ok this worked:

sudo pacman -S jdk17-openjdk
sudo archlinux-java set java-17-openjdk

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

But should I close the issue? There are definitely some issues (not related to jdk) that shouldn't occur in the first place, when I used jdk 21

from python-for-android.

RobertFlatt avatar RobertFlatt commented on August 21, 2024

For available JDK versions see the install instructions https://github.com/kivy/buildozer/blob/master/docs/source/installation.rst#android-on-ubuntu-2004-and-2204-64bit

The issues were, in no particular order:

  • Wrong Cython version (see install instructions)
  • Wrong JDKversions (see install instructions)
  • Failure to cleanup after the above (see previous link)

from python-for-android.

GiorgosXou avatar GiorgosXou commented on August 21, 2024

Whatever, it just worked and i have an apk, so I close it I guess

from python-for-android.

Samael-TLB avatar Samael-TLB commented on August 21, 2024

Had faced the same issue a day or two prior and solved it by having pyjnius version to either 1.6.0 or master and also having cython listed as a requirement, cython version may also be pinned to master or 3.0.4. The p4a recipes for pyjnius and cython still use the previous versions, it can be solved just by upgrading them to the latest ones.

from python-for-android.

Related Issues (20)

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.