Python, Kivy, Buildozer: APK crashes with SymPy

678 views Asked by At

As the title says, I've made an .apk to run on my Android mobile. It runs perfectly on PC. As soon as I take out all SymPy commands, it runs on Android too. I've mentioned the "sympy" in the buildozer.spec file, and it's not giving any errors. But as soon, as the loading on my Android-screen is over, the App disappears.

Does anyone know, if I have to do more, than mentioning the sympy in the .specs file?

ADB-Logcat: "ImportError: No module named unittest"

I don't know, what "unittest" ist, and why it's trying to get imported.

Solved: I found unittest.py (google: "inurl:unittest.py") and saved it inside the project folder.

1

There are 1 answers

0
Andre Miras On

I know this is an old topic, but I think it can still help.

This is because the unittest module is blacklisted, see blacklist.txt file in the .buildozer/ directory.

grep unittest .buildozer/android/platform/build/dists/*/blacklist.txt

So you can whitelist it by updating your buildozer.spec:

# (list) Pattern to whitelist for the whole project
android.whitelist = unittest/*