我试图用包tapo-plug,kivy和buildozer做一个Android应用程序,但打开后应用程序直接崩溃。我从来没有这样做过。这是我的手机发送的错误消息:
02-04 16:32:53.560 23072 23113 I python : Traceback (most recent call last):
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/app/main.py", line 19, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/tapo_plug/tapoPlugApi.py", line 11, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/tapo_plug/tapoEncryption.py", line 7, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/Crypto/PublicKey/RSA.py", line 38, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/Crypto/IO/PKCS8.py", line 44, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/Crypto/IO/_PBES.py", line 43, in <module>
02-04 16:32:53.561 23072 23113 I python : File "/home/daniel/test/ServerManagementApp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Vexludus/arm64-v8a/Crypto/Hash/MD5.py", line 45, in <module>
02-04 16:32:53.561 23072 23113 I python : NameError: name 'sys' is not defined
02-04 16:32:53.561 23072 23113 I python : Python for android ended.
我已经设置了tapo-plug,Crypto,PyCryptodome,pyjwkest,pycrypto作为要求。
这是我第一次做这种事。
这是发生错误的脚本部分:
from Crypto.Util.py3compat import *
从Crypto. Utility原始API导入(加载pypcryptodome原始库、空指针、智能指针、创建字符串缓冲区、获取原始缓冲区、c大小t、c_uint8_ptr)
原始数据库=加载原始数据库(“加密哈希表MD5”,“”#定义MD5数字数据库大小16
int MD5_init(void **shaState);
int MD5_destroy(void *shaState);
int MD5_update(void *hs,
const uint8_t *buf,
size_t len);
int MD5_digest(const void *shaState,
uint8_t digest[MD5_DIGEST_SIZE]);
int MD5_copy(const void *src, void *dst);
int MD5_pbkdf2_hmac_assist(const void *inner,
const void *outer,
const uint8_t first_digest[MD5_DIGEST_SIZE],
uint8_t final_digest[MD5_DIGEST_SIZE],
size_t iterations);
""")
1条答案
按热度按时间mwkjh3gx1#
这是很难猜测是什么原因导致你的问题没有最小的可复制的样本。我做了简单的Kivy项目,它在Windows和Android下工作没有问题。
建筑推土机.规范要求:
样本代码: