[Python] Issues with Kivy APK Build: ImportError Due to 64-bit vs 32-bit Library Conflict on...

Discussão em 'Python' iniciado por Stack, Junho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I'm a beginner and this is my first question here, so I apologize if it seems silly. I'm having trouble with building an APK for my Kivy app using Buildozer. When I try to run the app on an Android device, it crashes with the following error:

    ImportError: dlopen failed: "/data/data/org.test.pharmaapp/files/app/_python_bundle/site-packages/bidi/bidi.so" is 64-bit instead of 32-bit

    Here’s my buildozer.spec file's requirements line:

    requirements = python3,kivy,mysql-connector-python,arabic-reshaper,python-bidi

    I have included the arabic-reshaper and python-bidi libraries because Kivy does not support Arabic text natively. However, it looks like one of these libraries is causing the issue.

    My buildozer.spec also has the following setting for architectures:

    android.archs = arm64-v8a, armeabi-v7a

    Here is the relevant part of the log showing the error:

    08-13 16:13:50.270 1565 2504 I python : Traceback (most recent call last):
    08-13 16:13:50.271 1565 2504 I python : File "/mnt/c/Users/omart/OneDrive/Documents/Omar/.buildozer/android/app/main.py", line 9, in <module>
    08-13 16:13:50.272 1565 2504 I python : File "/mnt/c/Users/omart/OneDrive/Documents/Omar/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/pharmaapp/armeabi-v7a/bidi/__init__.py", line 21, in <module>
    08-13 16:13:50.272 1565 2504 I python : File "/mnt/c/Users/omart/OneDrive/Documents/Omar/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/pharmaapp/armeabi-v7a/bidi/wrapper.py", line 5, in <module>
    08-13 16:13:50.273 1565 2504 I python : ImportError: dlopen failed: "/data/data/org.test.pharmaapp/files/app/_python_bundle/site-packages/bidi/bidi.so" is 64-bit instead of 32-bit
    08-13 16:13:50.273 1565 2504 I python : Python for android ended.



    After asking chatgpt (it didn't gave me any useful solution) but what i understood is that the issue might be with the compatibility of the arabic-reshaper and/or python-bidi libraries with the ARM architectures specified.(I dont even know what does that mean) How can I resolve this error ?

    Continue reading...

Compartilhe esta Página