简体   繁体   中英

Python, Kivy, Buildozer: APK crashes with SymPy

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.

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/*

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM