Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant import kivy._event, crashing on from kivy.event import EventDispatcher #362

Closed
sharkguto opened this issue Jun 1, 2016 · 2 comments

Comments

@sharkguto
Copy link

sharkguto commented Jun 1, 2016

Hello guys,

I am not able to run my apk.... i am using python3crystax recipe

I can build with success, however on android it not running. Someone can help me?

Buildozer output:

`06-01 18:54:58.233  3452  3557 I python  : crystax_python exists
06-01 18:54:58.233  3452  3557 I python  : calculated paths to be...
06-01 18:54:58.233  3452  3557 I python  : /data/user/0/com.gmftech.lotoguess2/files/crystax_python/stdlib.zip:/data/user/0/com.gmftech.lotoguess2/files/crystax_python/modules
06-01 18:54:58.233  3452  3557 I python  : set wchar paths...
06-01 18:54:58.602  3452  3557 I python  : Initialized python
06-01 18:54:58.602  3452  3557 I python  : AND: Init threads
06-01 18:54:58.603  3452  3557 I python  : testing python print redirection
06-01 18:54:58.604  3452  3557 I python  : Android path ['.', '/data/user/0/com.gmftech.lotoguess2/files/crystax_python/stdlib.zip', '/data/user/0/com.gmftech.lotoguess2/files/crystax_python/modules', '/data/user/0/com.gmftech.lotoguess2/files/crystax_python/site-packages']
06-01 18:54:58.604  3452  3557 I python  : os.environ is environ({'ANDROID_PROPERTY_WORKSPACE': '10,0', 'PYTHONPATH': '/data/user/0/com.gmftech.lotoguess2/files:/data/user/0/com.gmftech.lotoguess2/files/lib', 'ANDROID_ENTRYPOINT': 'main.pyo', 'ANDROID_STORAGE': '/storage', 'ANDROID_PRIVATE': '/data/user/0/com.gmftech.lotoguess2/files', 'PATH': '/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin', 'EXTERNAL_STORAGE': '/sdcard', 'ANDROID_ARGUMENT': '/data/user/0/com.gmftech.lotoguess2/files', 'ANDROID_APP_PATH': '/data/user/0/com.gmftech.lotoguess2/files', 'BOOTCLASSPATH': '/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar', 'PYTHON_NAME': 'python', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_ROOT': '/system', 'ANDROID_SOCKET_zygote': '12', 'ANDROID_BOOTLOGO': '1', 'PYTHONHOME': '/data/user/0/com.gmftech.lotoguess2/files', 'SECONDARY_STORAGE': '/storage/sdcard1', 'ASEC_MOUNTPOINT': '/mnt/asec'})
06-01 18:54:58.605  3452  3557 I python  : Android kivy bootstrap done. __name__ is __main__
06-01 18:54:58.605  3452  3557 I python  : AND: Ran string
06-01 18:54:58.605  3452  3557 I python  : Run user program, change dir and execute entrypoint
06-01 18:54:58.605  3452  3557 I python  : main.py
06-01 18:54:58.634  3452  3557 I python  : ok
06-01 18:55:00.231  3452  3557 I python  : [WARNING           ] [Config      ] Older configuration version detected (0 instead of 15)
06-01 18:55:00.232  3452  3557 I python  : [WARNING           ] [Config      ] Upgrading configuration in progress.
06-01 18:55:00.245  3452  3557 I python  : [INFO              ] [Logger      ] Record log in /data/user/0/com.gmftech.lotoguess2/files/.kivy/logs/kivy_16-06-01_0.txt
06-01 18:55:00.246  3452  3557 I python  : [INFO              ] [Kivy        ] v1.9.2-dev0
06-01 18:55:00.246  3452  3557 I python  : [INFO              ] [Python      ] v3.5.0 (default, Dec 24 2015, 05:56:40) 
06-01 18:55:00.246  3452  3557 I python  : [GCC 5.3 20151204]
06-01 18:55:00.271  3452  3557 I python  :  Traceback (most recent call last):
06-01 18:55:00.272  3452  3557 I python  :    File "main.py", line 14, in <module>
06-01 18:55:00.273  3452  3557 I python  :      import kivymd.snackbar as Snackbar
06-01 18:55:00.273  3452  3557 I python  :    File "./kivymd/snackbar.py", line 3, in <module>
06-01 18:55:00.274  3452  3557 I python  :      from kivy.animation import Animation
06-01 18:55:00.274  3452  3557 I python  :    File "/data/user/0/com.gmftech.lotoguess2/files/crystax_python/site-packages/kivy/animation.py", line 87, in <module>
06-01 18:55:00.275  3452  3557 I python  :      from kivy.event import EventDispatcher
06-01 18:55:00.275  3452  3557 I python  :    File "/data/user/0/com.gmftech.lotoguess2/files/crystax_python/site-packages/kivy/event.py", line 8, in <module>
06-01 18:55:00.276  3452  3557 I python  :      import kivy._event
06-01 18:55:00.276  3452  3557 I python  :  ImportError: dlopen failed: cannot locate symbol "_Py_NoneStruct" referenced by "/data/data/com.gmftech.lotoguess2/files/crystax_python/site-packages/kivy/_event.so"...
06-01 18:55:00.322  3452  3557 I python  : Python for android ended.`

spec

`[app]
#sudo pip install https://github.com/kivy/buildozer/archive/master.zip
# (str) Title of your application
title = Loto Guess

# (str) Package name
package.name = lotoguess2

# (str) Package domain (needed for android/ios packaging)
package.domain = com.gmftech

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,ttf,mo

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to 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 = 0.2

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma seperated e.g. requirements = sqlite3,kivy
requirements = python3crystax,jinja2,openssl,requests,simplejson,kivy
#kivy==master


# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy

# (list) Garden requirements
garden_requirements = recycleview

# (str) Presplash of the application
presplash.filename = %(source.dir)s/data/lotto_icon.png
#presplash.filename = %(source.dir)s/data/Lucky_Coin.png
#presplash.filename = %(source.dir)s/data/loading.png
# (str) Icon of the application
icon.filename = %(source.dir)s/data/icon_verde.png

# (str) Supported orientation (one of landscape, portrait or all)
orientation = portrait

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 1

# (list) Permissions
android.permissions = CAMERA,INTERNET,ACCESS_NETWORK_STATE,WRITE_EXTERNAL_STORAGE,ACCESS_FINE_LOCATION,ACCESS_COARSE_LOCATION
# (int) Android API to use
#android.api = 19

# (int) Minimum API required
android.minapi = 14

# (int) Android SDK version to use
#android.sdk = 23


# (str) Android NDK version to use
android.ndk = 10e

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
android.ndk_path = /home/gustavo/crystax-ndk-10.3.1

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#android.p4a_dir = /home/gustavo/python-for-android

# (list) python-for-android whitelist
#android.p4a_whitelist =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (str) Bootstrap to use for android builds (android_new only)
# android.bootstrap = sdl2

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (str) python-for-android branch to use, if not master, useful to try
# not yet merged features.
#android.branch = master

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (list) Android additionnal libraries to copy into 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 the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =
#android.meta_data = com.google.android.gms.version=@integer/google_play_services_version
#android.library_references = google-play-services_lib



# (str) Android logcat filters to use
android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the 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 is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#


#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

`

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@inclement
Copy link
Member

I'm not sure what's wrong here, I haven't encountered this error. However, there are a few hacky bits of the python3 build that I hope to fix soon and could affect this, so hopefully one of them will deal with it.

@AndreMiras
Copy link
Member

Crystax support got dropped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants