2

I Am trying to deploy a kivy/kivyMD app to my android device. Had no issues until I added the pyodbc package to the .spec file. I can see that the architecture is wrong but am unsure as to how to fix this. From there, I tried rerunning the packaging and deployed it to my android. The app crashes on start and after running logcat, I got an error as show below. I've tried simply putting pyodbc (without the version number) and still get the same error. I'm also using Ubuntu 20.04 on WSL, android: Samsung s21 Ultra

Here is my .spec file requirements import section:

requirements = python3, kivy==2.0.0, https://github.com/kivymd/KivyMD/archive/master.zip, https://github.com/kivymd-extensions/akivymd/archive/main.zip, pygments, sdl2_ttf==2.0.15, pillow, kivymd, paramiko, ecdsa, cryptography, bcrypt, pynacl, pyodbc==4.0.24, kivy_garden.mapview, requests, urllib3, openssl, charset_normalizer, idna

And here is the logcat error

03-30 11:07:50.162 22745 22979 I python : [INFO ] [Window ] auto add sdl2 input provider 03-30 11:07:50.162 22745 22979 I python : [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked 03-30 11:07:50.164 22745 22979 I python : [INFO ] [KivyMD ] 1.0.0.dev0, git-Unknown, 2022-03-30 (installed at "/data/user/0/org.kivymd.owr/files/app/_python_bundle/site-packages/kivymd/__init__.pyc") 03-30 11:07:50.169 22745 22979 I python : [INFO ] [Text ] Provider: sdl2 03-30 11:07:50.343 22745 22979 I python : Traceback (most recent call last): 03-30 11:07:50.343 22745 22979 I python : File "/root/Kivy/Second/OWR-2/.buildozer/android/app/main.py", line 19, in <module> 03-30 11:07:50.344 22745 22979 I python : ImportError: dlopen failed: "/data/user/0/org.kivymd.owr/files/app/_python_bundle/site-packages/pyodbc.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183) 03-30 11:07:50.344 22745 22979 I python : Python for android ended.

I would appreciate any input! Also, this is my first time posting so I hope the format of my question is good! Thanks

I tried to deploy apk with pyodbc and got crashes on start. Architecture mismatch seems to be the error here. I'm also using Ubuntu 20.04 on WSL.

1 Answers1

0

Happened from me for the first time just today, I´m still trying to figure it out why but it seems very related with the fact that the module its compiled for a different machine, here is my log file.

05-19 13:52:02.691  5278  5317 I python  :    File "/content/Irrigation_Av_Madrid/App/pyIrrigation/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/irrigatrix/arm64-v8a/kivy/event.py", line 8, in <module>
05-19 13:52:02.691  5278  5317 I python  :  ImportError: dlopen failed: "/data/data/org.test.irrigatrix/files/app/_python_bundle/site-packages/kivy/_event.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
05-19 13:52:02.691  5278  5317 I python  : Python for android ended.

I would appreciate some hints, I´m trying to compile previously working code and this error its driving me nuts.

My call its that, for some reason, this module in particular was compiled for a different machine, still don´t understand why.