How to fix 'jnius.jnius.JavaException' in kivy plyer vibrate android test apk (with buildozer compilation)

398 views
Skip to first unread message

Romuald Kerloc'h

unread,
Apr 18, 2019, 8:45:37 AM4/18/19
to Kivy users support

Hello Everybody


I wan't test plyer library with kivy and i tried to test a simple android vibrate. The app end with this log :


04-17 23:49:40.292 15287 15340 I python  :    File "jnius/jnius_export_class.pxi", line 1034, in jnius.jnius.JavaMultipleMethod.__call__
04-17 23:49:40.292 15287 15340 I python  :  jnius.jnius.JavaException: No methods matching your arguments, available: [u'(ILjava/lang/String;[JILandroid/media/AudioAttributes;)V', u'(ILjava/lang/String;JLandroid/media/AudioAttributes;)V']
04-17 23:49:40.292 15287 15340 I python  : Python for android ended.


It's a simple Kivy plyer vibrate test


Ubuntu 18.04 - Kivy v1.10.1 - Python v2.7.15rc1 - plyer-1.4.0 - Buildozer 0.39 - cython-0.29.7 - pyjnius-1.2.0


__version__ = '1.0'

import kivy

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button

from plyer import vibrator

class TestApp(App):

    def build(self):
        bl = BoxLayout()
        btn = Button(text='Vibrate')
        bl.add_widget(btn)
        btn.bind(on_press=self.callback)
        return bl

    def callback(instance, value):
        vibrator.vibrate(10)
 

buildozer.spec


requirements = kivy, python2
android.permissions = VIBRATE



I expect a simple android phone vibrate to test


Thanks

Robert Flatt

unread,
Apr 18, 2019, 9:44:17 PM4/18/19
to Kivy users support
This thread from two weeks ago might be the answer, though perhaps not the one you want
Reply all
Reply to author
Forward
0 new messages