python debug

How to read and write to external storage in latest android API>29 from Kivy python

How to read and write to external storage in latest android API>29 from Kivy python

Latest development in Android needs significant modifications in the way we seek permissions to read and write files in the external storage of android. Old method of seeking android.permission.READ_EXTERNAL_STORAGE and android.permission.WRITE_EXTERNAL_STORAGE will not work any more. Lets see the reason and the possible work around to resolve this in this post. The Python code with […]

How to read and write to external storage in latest android API>29 from Kivy python Read More ยป

How to solve hunks FAILED -- saving rejects to file

How to solve hunks FAILED — saving rejects to file

During the building of android app from python code you may come across this error RAN: /usr/bin/patch -t -d /home/gk/.local/share/python-for-android/build/other_builds/opencv/arm64-v8a__ndk_target_24/opencv -p1 -i /home/gk/.local/lib/python3.11/site-packages/pythonforandroid/recipes/opencv/patches/p4a_build.patch STDOUT: patching file cmake/OpenCVDetectPython.cmake Hunk #1 FAILED at 175. Hunk #2 FAILED at 244. 2 out of 2 hunks FAILED — saving rejects to file cmake/OpenCVDetectPython.cmake.rej patching file modules/python/CMakeLists.txt What does the

How to solve hunks FAILED — saving rejects to file Read More ยป

How to solve Running cythonize failed in python for android or buildozer

How to solve Running cythonize failed in python for android or buildozer

The error Running cythonize failed can be a outcome when the numpy version you are building is not suitable for the python interpreter you are packaging. This can happen when you use Python for android and Buildozer. Error output Following is the error output Error compiling Cython file: ———————————————————— … self.rng_state.ctr.v[i] = counter[i] self._reset_state_variables() self._bitgen.state

How to solve Running cythonize failed in python for android or buildozer Read More ยป

How to solve destination path external jpeg' already exists and is not an empty directory.

How to solve destination path ‘external/jpeg’ already exists and is not an empty directory.

Some times you may get the following error while building an android app from python code RAN: /home/gk/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/SDL2_image/external/download.sh STDOUT: fatal: destination path ‘external/jpeg’ already exists and is not an empty directory. This can be resolved by cleaning the build in both python for android p4a or buildozer by executing the following commands p4aclean-dists p4aclean_download_cache p4aclean_builds

How to solve destination path ‘external/jpeg’ already exists and is not an empty directory. Read More ยป

Resolve No module named math during building app in python for android or buildozer

Solve No module named math during building app in python for android or buildozer

While building an Python based android app you may encounter the following error [2m< from random import Random as _Random[0m [2m< File “/home/gk/.local/share/python-for- android/build/other_builds/hostpython3/desktop/hostpython3/Lib/random.py”, line 49, in <module>[0m [2m< from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil[0m [2m< ModuleNotFoundError: No module named ‘math’[0m[2m[0m This is

Solve No module named math during building app in python for android or buildozer Read More ยป

Scroll to Top