python - Can not Access Socket Library in Buildozer Android App -
i trying import socket in main.py
but gives me error below in log-cat of android
i/python (28346): file "/root/.buildozer/android/app/main.py", line 3, in <module> i/python (28346): socket.error: port/proto not found i/python (28346): python android ended. it works fine in linux when make app using buildozer crash.am missing module in buildozer?
my buildozer.spec below.
[app] # (str) title of application title = easy port scanner # (str) package name package.name = in.technhack.easyportscanner # (str) package domain (needed android/ios packaging) package.domain = in.technhack.easyportscanner # (str) source code main.py live source.dir = . # (list) source files include (let empty include files) source.include_exts = py,png,jpg,kv,atlas,ttf # (list) source files exclude (let empty not exclude anything) #source.exclude_exts = spec # (list) list of directory exclude (let empty not exclude anything) #source.exclude_dirs = tests, bin # (list) list of exclusions using pattern matching #source.exclude_patterns = license,images/*/*.jpg # (str) application versioning (method 1) #version.regex = __version__ = ['"](.*)['"] #version.filename = %(source.dir)s/main.py # (str) application versioning (method 2) version = 1.0 # (list) application requirements # comma seperated e.g. requirements = sqlite3,kivy requirements = kivy,openssl,pyjnius,pygments,python,android # (str) custom source folders requirements # sets custom source requirements recipes # requirements.source.kivy = ../../kivy # (list) garden requirements #garden_requirements = # (str) presplash of application #presplash.filename = %(source.dir)s/data/presplash.png # (str) icon of application #icon.filename = %(source.dir)s/data/icon.png # (str) supported orientation (one of landscape, portrait or all) orientation = portrait # (bool) indicate if application should fullscreen or not fullscreen = 0 # # android specific # # (list) permissions android.permissions = internet # (int) android api use #android.api = 19 # (int) minimum api required android.minapi = 9 # (int) android sdk version use #android.sdk = 20 # (str) android ndk version use #android.ndk = 9c # (bool) use --private data storage (true) or --dir public storage (false) #android.private_storage = true # (str) android ndk directory (if empty, automatically downloaded.) #android.ndk_path = # (str) android sdk directory (if empty, automatically downloaded.) #android.sdk_path = # (str) ant directory (if empty, automatically downloaded.) #android.ant_path = # (str) python-for-android git clone directory (if empty, automatically cloned github) #android.p4a_dir = # (list) python-for-android whitelist #android.p4a_whitelist = # (str) android entry point, default ok kivy-based app #android.entrypoint = org.renpy.android.pythonactivity # (list) list of java .jar files add libs pyjnius can access # classes. don't add jars not need, since jars can slow # down build process. allows wildcards matching, example: # ouya-odk/libs/*.jar #android.add_jars = foo.jar,bar.jar,path/to/more/*.jar # (list) list of java files add android project (can java or # directory containing files) #android.add_src = # (str) python-for-android branch use, if not master, useful try # not yet merged features. #android.branch = master # (str) ouya console category. should 1 of game or app # if leave blank, ouya support not enabled #android.ouya.category = game # (str) filename of ouya console icon. must 732x412 png image. #android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png # (str) xml file include intent filters in <activity> tag #android.manifest.intent_filters = # (list) android additionnal libraries copy libs/armeabi #android.add_libs_armeabi = libs/android/*.so #android.add_libs_armeabi_v7a = libs/android-v7/*.so #android.add_libs_x86 = libs/android-x86/*.so #android.add_libs_mips = libs/android-mips/*.so # (bool) indicate whether screen should stay on # don't forget add wake_lock permission if set true #android.wakelock = false # (list) android application meta-data set (key=value format) #android.meta_data = # (list) android library project add (will added in # project.properties automatically.) #android.library_references = # # ios specific # # (str) name of certificate use signing debug version # list of available identities: buildozer ios list_identities #ios.codesign.debug = "iphone developer: <lastname> <firstname> (<hexstring>)" # (str) name of certificate use signing release version #ios.codesign.release = %(ios.codesign.debug)s [buildozer] # (int) log level (0 = error only, 1 = info, 2 = debug (with command output)) log_level = 2 # (int) display warning if buildozer run root (0 = false, 1 = true) warn_on_root = 0 # ----------------------------------------------------------------------------- # list sections # # can define "list" [section:key]. # each line considered option list. # let's take [app] / source.exclude_patterns. # instead of doing: # #[app] #source.exclude_patterns = license,data/audio/*.wav,data/images/original/* # # can translated into: # #[app:source.exclude_patterns] #license #data/audio/*.wav #data/images/original/* # # ----------------------------------------------------------------------------- # profiles # # can extend section / key profile # example, want deploy demo version of application without # hd content. first change title add "(demo)" in name # , extend excluded directories remove hd content. # #[app@demo] #title = application (demo) # #[app:source.exclude_patterns@demo] #images/hd/* # # then, invoke command line "demo" profile: # #buildozer --profile demo android debug
Comments
Post a Comment