Closed chavarinbonbyn closed 1 year ago
Please the build log and the buildozer.spec
, the kivy versions and target Python versions you shared gave me some doubts.
Also please try with recent build artifacts and tell us how it runs:
https://github.com/kivy/python-for-android/actions/runs/131218787
Try both bdist_test_app_unittests__armeabi-v7a-debug-1.1.apk and bdist_test_app_unittests__arm64-v8a-debug-1.1.apk
By the way, these kind of errors that happen only on a given device are usually hard to fix if we can't reproduce it. So if this really happens because of the device, best would be that you investigate and fix it
Here is the info requested.
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Programa de gestión de paquetes de Debian `dpkg' versión 1.19.0.5 (amd64).
Esto es software libre; consulte la Licencia Pública General de GNU versión 2 o
posterior para conocer las condiciones de copia. No hay NINGUNA garantía.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /home/.local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /home/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /home/.buildozer/android/platform/python-for-android
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
[INFO]: Will compile for the following archs: armeabi-v7a [INFO]: Found Android API target in $ANDROIDAPI: 27 [INFO]: Available Android APIs are (27) [INFO]: Requested API target 27 is available, continuing. [INFO]: Found NDK dir in $ANDROIDNDK: /home/.buildozer/android/platform/android-ndk-r19b [INFO]: Found NDK version 19b [INFO]: Getting NDK API version (i.e. minimum supported API) from user argument [INFO]: Found virtualenv at /home/.local/bin/virtualenv [INFO]: ccache is missing, the build will not be optimized in the future. [INFO]: Found the following toolchain versions: ['4.9'] [INFO]: Picking the latest gcc toolchain, here 4.9 [INFO]: Of the existing distributions, the following meet the given requirements: [INFO]: myapp: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy), built for archs (armeabi-v7a) [INFO]: myapp has compatible recipes, using this one
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
[INFO]: Available Android APIs are (27)
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /home/
[INFO]: Found NDK version 19b
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]: Found virtualenv at /home/.local/bin/virtualenv
[INFO]: ccache is missing, the build will not be optimized in the future.
[INFO]: Found the following toolchain versions: ['4.9']
[INFO]: Picking the latest gcc toolchain, here 4.9
[INFO]: Of the existing distributions, the following meet the given requirements:
[INFO]: myapp: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy), built for archs (armeabi-v7a)
[INFO]: myapp has compatible recipes, using this one
[INFO]: Of the existing distributions, the following meet the given requirements:
[INFO]: myapp: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy), built for archs (armeabi-v7a)
[INFO]: myapp has compatible recipes, using this one
[INFO]: -> directory context /.buildozer/android/platform/build-armeabi-v7a/dists/myapp__armeabi-v7a
[INFO]: Selecting java build tool:
[INFO]: Detected highest available build tools version to be 30.0.0-rc2
[INFO]: Building with gradle, as gradle executable is present
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]:
[DEBUG]: BUILD SUCCESSFUL in 4s
[DEBUG]: 27 actionable tasks: 4 executed, 23 up-to-date
[INFO]: <- directory context /home/.buildozer/android/platform/python-for-android [INFO]: # Copying APK to current directory [INFO]: # APK filename not found in build output. Guessing... [INFO]: # Found APK file: /home/.buildozer/android/platform/build-armeabi-v7a/dists/myapparmeabi-v7a/build/outputs/apk/debug/myapparmeabi-v7a-debug.apk [INFO]: # Add version number to APK [INFO]: # APK renamed to myapparmeabi-v7a-debug-2.0-.apk [DEBUG]: -> running cp /home/.buildozer/android/platform/build-armeabi-v7a/dists/myapparmeabi-v7a/build/outputs/apk/debug/myapparmeabi-v7a-debug.apk myapparmeabi-v7a-debug-2.0-.apk WARNING: Received a --sdk argument, but this argument is deprecated and does nothing. No compiled python is present to zip, skipping. No setup.py/pyproject.toml used, copying full private data into .apk. Applying Java source code patches... Applying patch: src/patches/SDLActivity.java.patch Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
- buildozer.spec
[app]
title = myapp
package.name = myapp
package.domain = org.test.myapp
source.dir = .
source.include_exts = py,png,jpg,kv,db,txt,mo
version.regex = version = '"['"] version.filename = %(source.dir)s/main.py
requirements = python3,kivy
garden_requirements = graph
orientation = portrait
#
#
#
osx.python_version = 3.6.7
osx.kivy_version = 1.11.0
#
#
fullscreen = 0
android.logcat_filters = *:S python:D
android.arch = armeabi-v7a
#
#
#
#
ios.kivy_ios_url = https://github.com/kivy/kivy-ios ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy ios.ios_deploy_branch = 1.7.0
[buildozer]
log_level = 2
warn_on_root = 1
#
#
#
#
#
#
#
#
#
#
- ADB Logcat:
06-15 20:09:26.799 24368 24404 I python : File "/data/data/org.test.test_buddy.myapp/files/app/view/welcome.kv", line 46, in
- Trying bdist_test_app_unittests__armeabi-v7a-debug-1.1.apk:
Ran 14 tests in 1.568s OK
- Trying bdist_test_app_unittests__arm64-v8a-debug-1.1.apk:
Ran 14 tests in 1.69.1s OK
From the log
- master b1f6064d [origin/master] Release 2019.10.06 (#1998)
From the .spec
(str) python-for-android branch to use, defaults to master p4a.branch = master
This is a really old version of p4a, not the master version. Explains why the the message is Python3.7 not Python 3.8
But not why the message occurs, or why 'master' is not 2020.6.2
Closing as the issue looks related to an old version of python-for-android
(we're now targeting Python==3.10
)
To the original author: feel free to re-open the issue if it persists with the new python-for-android
release.
Versions
Description
This line works OK on the computer and in several Phones: def open_settings(self): from controller.settings import Settings
On a Huawei that line throws the following error on ADB logcat: 06-12 19:39:53.265 10723 10762 I python : ImportError: dlopen failed: library "libpython3.7m.so" not found
buildozer.spec
Just a standard spec file, nothing special. The same spec file works on other phones.
Command: from controller.settings import Settings
Logs