为什么使用paramiko模块时Kivy应用程序崩溃

为什么使用paramiko模块时Kivy应用程序崩溃

本文介绍了为什么使用paramiko模块时Kivy应用程序崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用paramiko的应用程序,该应用程序本身运行良好,但是当您启动它时会崩溃,我知道它在paramiko模块中.我已经在main.py文件旁边放置了白名单并位于 pythonforandroid/bootstraps/sdl2/build文件夹/

I have an application using paramiko, the application itself is going well, but it crashes when you start it, I understand it's in the paramiko module. I have placed the white list next to main.py file and next to the black list file in the pythonforandroid/bootstraps/sdl2/build folder/

我的规格文件的一部分:

Part of my spec file:

source.include_exts = py,png,jpg,kv,atlas
requirements = kivy,kivymd,boto3,botocore,openssl,pyjnius,ecdsa,bcrypt,cryptography,paramiko, android
osx.python_version = 3
osx.kivy_version = 1.10.1
android.permissions = INTERNET, ACCESS_NETWORK_STATE
android.whitelist_src = whitelist.txt

日志文件

日志文件的一部分(我认为这会导致应用关闭)

part of log file (which in my opinion causes the app to close)

06-04 16:31:49.640 21791 21824 I python  :  Traceback (most recent call last):
06-04 16:31:49.640 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/app/main.py", line 5, in <module>
06-04 16:31:49.641 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/paramiko/__init__.py", line 22, in <module>
06-04 16:31:49.641 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/paramiko/transport.py", line 89, in <module>
06-04 16:31:49.642 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/paramiko/dsskey.py", line 37, in <module>
06-04 16:31:49.643 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/paramiko/pkey.py", line 31, in <module>
06-04 16:31:49.644 21791 21824 I python  :    File "/home/kivy/Desktop/touchtracer2/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/bcrypt/__init__.py", line 25, in <module>
06-04 16:31:49.644 21791 21824 I python  :  ImportError: dlopen failed: "/data/data/org.test.myapp/files/app/_python_bundle/site-packages/bcrypt/_bcrypt.so" is 64-bit instead of 32-bit
06-04 16:31:49.644 21791 21824 I python  : Python for android ended.

我的应用程序,专门用于测试

My app, exclusively for the test

from kivy.lang import Builder
from kivymd.app import MDApp
import boto3
import io
import paramiko
KV = '''
Screen:
    Button:
        id: button
        text: "Start"
        font_size: "18sp"
        on_release: app.start()
'''
class MainApp(MDApp):
    def build(self):
        self.theme_cls.primary_palette = "Green"
        return Builder.load_string(KV)
    def start(self):
        print('1')
MainApp().run()

buildozer.spec

推荐答案

我将buildozer更新到版本1.2.0,注释掉了这些行p4a.source_dir = /home/kivy/Repos/python-for-android/ android.ndk_path android.sdk_path,安装了python 3.8,在终端中实现了此命令buildozer android clean并修整了该行requirements = kivy,kivymd,boto3,botocore,openssl,pyjnius,ecdsa,bcrypt,cryptography,paramiko,dateutil,urllib3,jmespath,PyNaCl, android

I updated buildozer to version 1.2.0, commented out these lines p4a.source_dir = /home/kivy/Repos/python-for-android/ android.ndk_path android.sdk_path, installed python 3.8, fulfilled this command in the terminal buildozer android clean and trimmed this line requirements = kivy,kivymd,boto3,botocore,openssl,pyjnius,ecdsa,bcrypt,cryptography,paramiko,dateutil,urllib3,jmespath,PyNaCl, android

这篇关于为什么使用paramiko模块时Kivy应用程序崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 03:28