Closed davied9 closed 5 years ago
That's interesting, I haven't tried to reproduce, but your setup doesn't seem off. I would say it glitched.
Do you have this directory/file (from your project dir)?
.buildozer/android/platform/build/dists/simpleapp/jni/SDL2_image/CHANGES.txt
or maybe it's:
.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/SDL2_image/CHANGES.txt
If you do can you head .buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/SDL2_image/CHANGES.txt
The only thing I can think of is it didn't download/unpack the correct version 2.0.4.
If you don't then simply clean and try again :crossed_fingers:
buildozer android clean
buildozer android debug
@AndreMiras Thanks for the help. I don't have neither of them, the following directory is empty
.buildozer/android/platform/build/dists/simpleapp
and the SDL2_image directory as follows
.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/SDL2_image
have the following file tree
Xcode
IMG_svg.c
I ran
pipenv run python -m buildozer android clean
and got this error
FileNotFoundError: [Errno 2] No such file or directory: '/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/python-for-android': '/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/python-for-android'
sure the directory does not exist (BTW, I never run clean command successfully and got the error above), so I delete everything under directory
~/Desktop/workspace/build_area/buildozer_projects/test/.buildozer
then I've done this(delete everything in .buildozer && build) for 2 more times, every time I got this error
[INFO]: Building pyjnius for armeabi-v7a
[INFO]: jnius apparently isn't already in site-packages
[INFO]: Cythonizing anything necessary in pyjnius
[INFO]: -> directory context /home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: -> running python -c import sys; print(sys.path)
[INFO]: Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]: -> running python setup.py build_ext -v
Exception in thread background thread for pid 70862:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/dav/.local/share/virtualenvs/build_area-AnJkn9zu/lib/python3.7/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/home/dav/.local/share/virtualenvs/build_area-AnJkn9zu/lib/python3.7/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/home/dav/.local/share/virtualenvs/build_area-AnJkn9zu/lib/python3.7/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/dav/.local/share/virtualenvs/build_area-AnJkn9zu/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py build_ext -v
STDOUT:
/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/jnius
arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot -I/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/python-installs/SimpleApp/include/python3.7 -DNDEBUG -g -fwrapv -O3 -Wall -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/dav/Desktop/workspace/android/android-ndk-r17c/sysroot -I/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/python-installs/SimpleApp/include/python3.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Include -fPIC -I/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/dav/Desktop/workspace/build_area/buildozer_projects/test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.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
STDERR:
and it leads me to #251 , after install cython with both
sudo apt install cython -y
and
pipenv run python -m pip install cython
I successfully build my first apk. So I'll close this ISSUE.
Nice thank you for the update, glad it's fixed. And your SDL2_image
definitely looked a bit off, but have been a problem with the download/extract somehow.
It could be that the download got aborted somehow and the archive was here incomplete or something
Yeah, the network is not stable here, cause we have the GFW, I have to save everything under
.buildozer/android/platform/build/packages/
copy them back and build again.
I've read the code of python-for-android,
if exists(filename) and isfile(filename):
if not exists(marker_filename):
shprint(sh.rm, filename)
elif expected_md5:
current_md5 = md5sum(filename)
if current_md5 != expected_md5:
debug('* Generated md5sum: {}'.format(current_md5))
debug('* Expected md5sum: {}'.format(expected_md5))
raise ValueError(
('Generated md5sum does not match expected md5sum '
'for {} recipe').format(self.name))
do_download = False
else:
do_download = False
the md5sum is checked, why did something like incomplete download happen ?
Yes the checksum is checked if available, see:
But currently I think only sdl2 has it, see: https://github.com/kivy/python-for-android/blob/v2019.06.06/pythonforandroid/recipes/sdl2/__init__.py#L9
This is probably because it's sometimes annoying when updating a recipe version to also compute it and we developers are lazy. But we would be happy to accept a PR adding a couple of checksum for critical recipes.
Versions
Description
Trying to build kivy SimpleApp example with following code as main.py
I've found the most related issue is #416 I've checked my buildozer.spec file, there is no comment(#) after a configuration line, and I did not specify p4a.local_recipes. And still build failed with following message
buildozer.spec
Command:
Spec file:
Logs