KivMob
KivMob copied to clipboard
Kivmob Error
main.py
from kivmob import KivMob, TestIds
from kivy.app import App
from kivy.uix.button import Button
class KivMobTest(App):
def build(self):
self.ads = KivMob(TestIds.APP)
self.ads.new_interstitial(TestIds.INTERSTITIAL)
self.ads.request_interstitial()
return Button(text='Show Interstitial',
on_release=lambda a: self.ads.show_interstitial())
def on_resume(self):
self.ads.request_interstitial()
KivMobTest().run()
logcat
10-12 23:29:32.158 29292 29334 I python : Android kivy bootstrap done. __name__ is __main__
10-12 23:29:32.158 29292 29334 I python : AND: Ran string
10-12 23:29:32.158 29292 29334 I python : Run user program, change dir and execute entrypoint
10-12 23:29:32.293 29292 29334 I python : [INFO ] [Logger ] Record log in /data/user/0/com.mohamed.kivmob/files/app/.kivy/logs/kivy_20-10-12_1.txt
10-12 23:29:32.293 29292 29334 I python : [INFO ] [Kivy ] v1.11.1
10-12 23:29:32.293 29292 29334 I python : [INFO ] [Kivy ] Installed at "/data/user/0/com.mohamed.kivmob/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
10-12 23:29:32.293 29292 29334 I python : [INFO ] [Python ] v3.8.1 (default, Oct 12 2020, 22:40:16)
10-12 23:29:32.293 29292 29334 I python : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
10-12 23:29:32.294 29292 29334 I python : [INFO ] [Python ] Interpreter at ""
10-12 23:29:32.301 29292 29334 I python : [INFO ] [Factory ] 184 symbols loaded
10-12 23:29:33.168 29292 29334 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
10-12 23:29:33.235 29292 29334 I python : [INFO ] [Text ] Provider: sdl2
10-12 23:29:33.271 29292 29334 I python : [ERROR ] [KivMob ] Cannot load AdMob classes. Check buildozer.spec.
10-12 23:29:33.304 29292 29334 I python : [INFO ] [KivMob ] __init__ called.
10-12 23:29:33.304 29292 29334 I python : [INFO ] [KivMob ] Android platform detected.
10-12 23:29:33.305 29292 29334 I python : [INFO ] [KivMob ] new_interstitial() called.
10-12 23:29:33.307 29292 29334 I python : [INFO ] [KivMob ] request_interstitial() called.
10-12 23:29:33.311 29292 29292 I python : Traceback (most recent call last):
10-12 23:29:33.312 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/android/runnable.py", line 38, in run
10-12 23:29:33.313 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/kivmob.py", line 188, in __init__
10-12 23:29:33.314 29292 29292 I python : NameError: name 'MobileAds' is not defined
10-12 23:29:33.316 29292 29292 I python : Traceback (most recent call last):
10-12 23:29:33.318 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/android/runnable.py", line 38, in run
10-12 23:29:33.319 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/kivmob.py", line 233, in new_interstitial
10-12 23:29:33.320 29292 29292 I python : AttributeError: 'AndroidBridge' object has no attribute '_interstitial'
10-12 23:29:33.326 29292 29292 I python : Traceback (most recent call last):
10-12 23:29:33.327 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/android/runnable.py", line 38, in run
10-12 23:29:33.328 29292 29292 I python : File "/home/mohamed/MyApps/KIVMOB_APP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivmob/kivmob.py", line 237, in request_interstitial
10-12 23:29:33.329 29292 29292 I python : AttributeError: 'AndroidBridge' object has no attribute '_interstitial'
10-12 23:29:33.429 29292 29334 I python : [INFO ] [Window ] Provider: sdl2
10-12 23:29:33.470 29292 29334 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
10-12 23:29:33.472 29292 29334 I python : [INFO ] [GL ] Backend used <sdl2>
10-12 23:29:33.472 29292 29334 I python : [INFO ] [GL ] OpenGL version <b'OpenGL ES 3.2 v1.r14p0-00cet0.31a86e87332bf06c1331b4cf4bf388f8'>
10-12 23:29:33.472 29292 29334 I python : [INFO ] [GL ] OpenGL vendor <b'ARM'>
10-12 23:29:33.472 29292 29334 I python : [INFO ] [GL ] OpenGL renderer <b'Mali-G51'>
10-12 23:29:33.473 29292 29334 I python : [INFO ] [GL ] OpenGL parsed version: 3, 2
10-12 23:29:33.473 29292 29334 I python : [INFO ] [GL ] Texture max size <8192>
10-12 23:29:33.473 29292 29334 I python : [INFO ] [GL ] Texture max units <16>
10-12 23:29:33.508 29292 29334 I python : [INFO ] [Window ] auto add sdl2 input provider
10-12 23:29:33.509 29292 29334 I python : [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
10-12 23:29:33.514 29292 29334 I python : [WARNING] [Base ] Unknown <android> provider
10-12 23:29:33.514 29292 29334 I python : [INFO ] [Base ] Start application main loop
10-12 23:29:33.518 29292 29334 I python : [INFO ] [GL ] NPOT texture support is available
please help...
Please make changes to your buildozer.spec file according to KivMob documentation. Add KivMob in your buildozer requirements area.
I'm also facing the exact same problem, even with kivmob in requirements area
@MohamedAl-Kainai did u find a way to fix this error? im having the same issue. could you help if you have figured it out.
i faced the same error
I m also facing the same problem.
the problem seems to me is because of firebase-ads lower version than google + gradle versions.
So I think kivmob needs to be migrated to support upgraded gradle + firebase-ads version in buildozer.spec
I found useful link of migrating kivmob but by another person.
https://vucavucalife.com/kivy-trials-and-tribulations-of-integrating-admob-ads-into-an-android-app/
Hope it helps all!.
I found useful link of migrating kivmob but by another person.
https://vucavucalife.com/kivy-trials-and-tribulations-of-integrating-admob-ads-into-an-android-app/
Hope it helps all!.
Thank you so much
I found useful link of migrating kivmob but by another person.
https://vucavucalife.com/kivy-trials-and-tribulations-of-integrating-admob-ads-into-an-android-app/
Hope it helps all!.
Thank you Iruriksl your contribution was really helpful