[Python] Problem with android app when using python's Cryptodome

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I used kivy to build the android app and used buildozer to convert it to an APK. I use Cryptodome in my code for RSA encryption/decryption. Before I implemented the use of RSA the code worked fine, and now after I added it, it works fine on the computer but when I run the app on my phone the app immediately crashes and I get

    ImportError: CFFI with optimize=2 fails due to pycparser bug.


    And also

    AttributeError: undefined symbol: PyObject_GetBuffer


    The second problem appears to be in something called ctypes. To be clear, I added every needed imports to my buildozer.spec file and yet the problem persists. Does anyone know how to solve this? Or, if there are any other RSA modules in python that work on android?

    I have tried adding some imports to buildozer.spec but it didn't work. I have also tried to find other RSA modules in python but I didn't find anything that appeared to be good enough.

    Continue reading...

Compartilhe esta Página