Closed tripluS-h closed 5 years ago
This is due to this line:
which tries to import the android.config
part i.e. this:
and it seems to me from this error that you do not have a compiled android
module. Also, you use pygame
which is an old bootstrap instead of the new one (sdl2
). Try to add android
to your requirements.
Basically what happened is that you don't have android
module from p4a as expected from the notification implementation for android platform and the first import wants the value from:
so that it can use it in pyjnius
.
Note: whether it works on linux or not means only that the example Kivy application works, not that the notification itself works. Those are various different files located in platforms/<platform>/notification.py
files.
How can I do that through buildozer? Compiling using the android_new target also leads to a crash. Although I can't make sense of the logcat, maybe someone else can.
11-06 15:43:42.960 5576 5595 I python : [INFO ] [Logger ] Record log in /data/user/0/org.test.notiexample/files/app/.kivy/logs/kivy_18-11-06_1.txt
11-06 15:43:42.960 5576 5595 I python : [INFO ] [Kivy ] v1.10.1
11-06 15:43:42.960 5576 5595 I python : [INFO ] [Python ] v2.7.2 (default, Nov 6 2018, 15:25:50)
11-06 15:43:42.960 5576 5595 I python : [GCC 4.8]
11-06 15:43:42.962 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/_clock.so: is missing DT_SONAME will use basename as a replacement: "_clock.so"
11-06 15:43:42.980 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/_event.so: is missing DT_SONAME will use basename as a replacement: "_event.so"
11-06 15:43:42.981 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/properties.so: is missing DT_SONAME will use basename as a replacement: "properties.so"
11-06 15:43:42.989 5576 5595 I python : [INFO ] [Factory ] 194 symbols loaded
11-06 15:43:43.182 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/instructions.so: is missing DT_SONAME will use basename as a replacement: "instructions.so"
11-06 15:43:43.183 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/buffer.so: is missing DT_SONAME will use basename as a replacement: "buffer.so"
11-06 15:43:43.183 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/vertex.so: is missing DT_SONAME will use basename as a replacement: "vertex.so"
11-06 15:43:43.183 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/cgl.so: is missing DT_SONAME will use basename as a replacement: "cgl.so"
11-06 15:43:43.190 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/vbo.so: is missing DT_SONAME will use basename as a replacement: "vbo.so"
11-06 15:43:43.190 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/compiler.so: is missing DT_SONAME will use basename as a replacement: "compiler.so"
11-06 15:43:43.190 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/transformation.so: is missing DT_SONAME will use basename as a replacement: "transformation.so"
11-06 15:43:43.191 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/shader.so: is missing DT_SONAME will use basename as a replacement: "shader.so"
11-06 15:43:43.191 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/texture.so: is missing DT_SONAME will use basename as a replacement: "texture.so"
11-06 15:43:43.192 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/context_instructions.so: is missing DT_SONAME will use basename as a replacement: "context_instructions.so"
11-06 15:43:43.213 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/core/image/_img_sdl2.so: is missing DT_SONAME will use basename as a replacement: "_img_sdl2.so"
11-06 15:43:43.215 5576 5595 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
11-06 15:43:43.215 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/fbo.so: is missing DT_SONAME will use basename as a replacement: "fbo.so"
11-06 15:43:43.216 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/context.so: is missing DT_SONAME will use basename as a replacement: "context.so"
11-06 15:43:43.216 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/stencil_instructions.so: is missing DT_SONAME will use basename as a replacement: "stencil_instructions.so"
11-06 15:43:43.217 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/opengl.so: is missing DT_SONAME will use basename as a replacement: "opengl.so"
11-06 15:43:43.219 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/opengl_utils.so: is missing DT_SONAME will use basename as a replacement: "opengl_utils.so"
11-06 15:43:43.221 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/vertex_instructions.so: is missing DT_SONAME will use basename as a replacement: "vertex_instructions.so"
11-06 15:43:43.222 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/gl_instructions.so: is missing DT_SONAME will use basename as a replacement: "gl_instructions.so"
11-06 15:43:43.222 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/scissor_instructions.so: is missing DT_SONAME will use basename as a replacement: "scissor_instructions.so"
11-06 15:43:43.223 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/weakproxy.so: is missing DT_SONAME will use basename as a replacement: "weakproxy.so"
11-06 15:43:43.258 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/core/window/_window_sdl2.so: is missing DT_SONAME will use basename as a replacement: "_window_sdl2.so"
11-06 15:43:43.262 5576 5595 I python : [INFO ] [Window ] Provider: sdl2
11-06 15:43:43.268 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/cgl_backend/cgl_glew.so: is missing DT_SONAME will use basename as a replacement: "cgl_glew.so"
11-06 15:43:43.268 5576 5595 W linker : /data/data/org.test.notiexample/files/app/lib/python2.7/site-packages/kivy/graphics/cgl_backend/cgl_gl.so: is missing DT_SONAME will use basename as a replacement: "cgl_gl.so"
11-06 15:43:43.272 5576 5595 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
11-06 15:43:43.272 5576 5595 I python : [INFO ] [GL ] Backend used
Holy shit, just realized my buildozer is waaay out of date, closing this until I get that sorted out.
EDIT: thanks for your help @KeyWeeUsr , adding android to the requirements in buildozer.spec sorted things out
Using the example code (and any other instance of notification.notify) crashes on my android device. Also worth noting is that it works flawlessly on my (linux) laptop. Logcat:
11-06 11:56:36.878 16302 16321 I python : Traceback (most recent call last): 11-06 11:56:36.879 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/utils.py", line 95, in _ensure_obj 11-06 11:56:36.879 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/platforms/android/notification.py", line 5, in
11-06 11:56:36.880 16302 16321 I python : ImportError: No module named config
11-06 11:56:36.880 16302 16321 I python : [INFO ] [Base ] Leaving application in progress...
11-06 11:56:36.881 16302 16321 I python : Traceback (most recent call last):
11-06 11:56:36.881 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification/.buildozer/android/app/main.py", line 35, in
11-06 11:56:36.882 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/app.py", line 826, in run
11-06 11:56:36.882 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py", line 502, in runTouchApp
11-06 11:56:36.883 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 403, in mainloop
11-06 11:56:36.884 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 289, in _mainloop
11-06 11:56:36.884 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py", line 340, in idle
11-06 11:56:36.885 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py", line 325, in dispatch_input
11-06 11:56:36.885 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py", line 231, in post_dispatch_input
11-06 11:56:36.885 16302 16321 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch (kivy/_event.c:7727)
11-06 11:56:36.886 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/init.py", line 1360, in on_motion
11-06 11:56:36.887 16302 16321 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch (kivy/_event.c:7727)
11-06 11:56:36.887 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/init.py", line 1376, in on_touch_down
11-06 11:56:36.887 16302 16321 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch (kivy/_event.c:7727)
11-06 11:56:36.888 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/uix/widget.py", line 460, in on_touch_down
11-06 11:56:36.888 16302 16321 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch (kivy/_event.c:7727)
11-06 11:56:36.889 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/uix/behaviors/button.py", line 151, in on_touch_down
11-06 11:56:36.890 16302 16321 I python : File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch (kivy/_event.c:7682)
11-06 11:56:36.890 16302 16321 I python : File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch (kivy/_event.c:13525)
11-06 11:56:36.891 16302 16321 I python : File "kivy/_event.pyx", line 1098, in kivy._event.EventObservers._dispatch (kivy/_event.c:12357)
11-06 11:56:36.891 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/lang/builder.py", line 64, in custom_callback
11-06 11:56:36.892 16302 16321 I python : File "/data/data/org.test.notiexample/files/notificationdemo.kv", line 22, in
11-06 11:56:36.892 16302 16321 I python : on_press: root.do_notify(mode='normal')
11-06 11:56:36.893 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification/.buildozer/android/app/main.py", line 23, in do_notify
11-06 11:56:36.893 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/facades/notification.py", line 57, in notify
11-06 11:56:36.894 16302 16321 I python : File "/home/liam/Documents/AndroidServiceTest/notification_test/plyer/examples/notification/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/facades/notification.py", line 62, in _notify
11-06 11:56:36.894 16302 16321 I python : NotImplementedError: No usable implementation found!
11-06 11:56:36.925 16302 16321 I python : Python for android ended.
haven't found any information about this around, any suggestions? Or other ways to send android notifications?