Python,Kivy,Buildozer:APK与SymPy崩溃

时间:2022-02-07 20:24:48

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.

正如标题所说,我已经在我的Android手机上运行了.apk。它在PC上运行完美。一旦我取出所有SymPy命令,它也会在Android上运行。我在buildozer.spec文件中提到了“sympy”,并没有给出任何错误。但是很快,当我的Android屏幕上的加载结束时,应用程序就消失了。

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

有没有人知道,如果我必须做更多,而不是提及.specs文件中的同情?

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

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

我不知道,什么是“unittest”,以及为什么它试图进口。

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

解决:我找到了unittest.py(google:“inurl:unittest.py”)并将其保存在项目文件夹中。

1 个解决方案

#1


0  

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.

这是因为unittest模块被列入黑名单,请参阅.buildozer /目录中的blacklist.txt文件。

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

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

因此,您可以通过更新buildozer.spec将其列入白名单:

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

#1


0  

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.

这是因为unittest模块被列入黑名单,请参阅.buildozer /目录中的blacklist.txt文件。

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

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

因此,您可以通过更新buildozer.spec将其列入白名单:

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