Search code examples
androidpythonkivyadspyjnius

Kivy, AdBuddiz raises the error: __javaclass__ definition missing


I am trying to build my app using kivy, and it is looking great so far. Everything compiles and runs just fine with buildozer.

I am trying to incorporate ads into my app with AdBuddiz according to this website

https://github.com/kivy/kivy/wiki/AdBuddiz-Android-advertisements-integration-for-Kivy-apps

I am stuck in 4th step, as I it gives the error that says

jnius.jnius.JavaException: javaclass definition missing

I installed jnius by downloading this https://github.com/kivy/pyjnius and used the command: sudo python setup.py install

If you could help me fix this error or help me understand the error, I would appreciate so much.

Thank you.


Solution

  • The adbuddiz code won't run on the desktop, you have to run this stuff on the Android device. If you want to run the program without it on linux, put it in an if statement that checks kivy.platform.