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

'AndroidBridge' object has no attribute '_interstitial' #134

Open
lWaLKzz opened this issue Apr 9, 2023 · 14 comments
Open

'AndroidBridge' object has no attribute '_interstitial' #134

lWaLKzz opened this issue Apr 9, 2023 · 14 comments

Comments

@lWaLKzz
Copy link

lWaLKzz commented Apr 9, 2023

04-09 07:16:50.796 32743 667 I python : [INFO ] [KivMob ] new_interstitial() called.
04-09 07:16:50.803 32743 667 I python : [INFO ] [KivMob ] request_interstitial() called.
04-09 07:16:50.810 32743 667 I python : [INFO ] [KivMob ] show_interstitial() called.
04-09 07:16:50.819 32743 32743 I python : Traceback (most recent call last):
04-09 07:16:50.819 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/android/runnable.py", line 38, in run
04-09 07:16:50.820 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/app/kivmob.py", line 271, in new_interstitial
04-09 07:16:50.820 32743 32743 I python : AttributeError: 'AndroidBridge' object has no attribute '_interstitial'
04-09 07:16:50.824 32743 32743 I python : Traceback (most recent call last):
04-09 07:16:50.824 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/android/runnable.py", line 38, in run
04-09 07:16:50.824 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/app/kivmob.py", line 275, in request_interstitial
04-09 07:16:50.825 32743 32743 I python : AttributeError: 'AndroidBridge' object has no attribute '_interstitial'
04-09 07:16:50.828 32743 32743 I python : Traceback (most recent call last):
04-09 07:16:50.828 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/android/runnable.py", line 38, in run
04-09 07:16:50.828 32743 32743 I python : File "/home/qsert/Masaüstü/ads/.buildozer/android/app/kivmob.py", line 279, in _is_interstitial_loaded
04-09 07:16:50.829 32743 32743 I python : AttributeError: 'AndroidBridge' object has no attribute '_interstitial'

@mulivham
Copy link

Hi, Did you make changes to your buildozer.spec file according to KivMob documentation? Especially the Android SDK version part.

@lWaLKzz
Copy link
Author

lWaLKzz commented Apr 11, 2023

Hi, Did you make changes to your buildozer.spec file according to KivMob documentation? Especially the Android SDK version part.

requirements = python3, kivy, android, jnius, https://github.com/MichaelStott/KivMob/archive/refs/heads/master.zip
...
android.permissions = INTERNET, ACCESS_NETWORK_STATE
android.api = 33
android.minapi = 21
android.sdk = 33
android.ndk = 25b
android.gradle_dependencies = com.google.firebase:firebase-ads:21.4.0
android.enable_androidx = True
p4a.branch = master
android.meta_data = com.google.android.gms.ads.APPLICATION_ID=ca-app-pub-3940256099942544~3347511713

@dextromen
Copy link

I have same issue, everything seems fine in buildozer specs but I got same error.

@mulivham
Copy link

Hi, Did you make changes to your buildozer.spec file according to KivMob documentation? Especially the Android SDK version part.

requirements = python3, kivy, android, jnius, https://github.com/MichaelStott/KivMob/archive/refs/heads/master.zip ... android.permissions = INTERNET, ACCESS_NETWORK_STATE android.api = 33 android.minapi = 21 android.sdk = 33 android.ndk = 25b android.gradle_dependencies = com.google.firebase:firebase-ads:21.4.0 android.enable_androidx = True p4a.branch = master android.meta_data = com.google.android.gms.ads.APPLICATION_ID=ca-app-pub-3940256099942544~3347511713

Remove ~/.buildozer to start from scratch if you are using linux

Install OpenJDK 17 or 11 remove the latest version

Upgrade to latest buildozer version, if you haven't already

Make change on requirements = replace jnius with pyjnius
and also android.gradle_dependencies = com.google.firebase:firebase-ads:19.8.0 or any lower version

then try again

@mulivham
Copy link

I have same issue, everything seems fine in buildozer specs but I got same error.
what are you using to run your code.. Google Colab or linus os?

@dextromen
Copy link

I have same issue, everything seems fine in buildozer specs but I got same error.
what are you using to run your code.. Google Colab or linus os?

linux

@boyintheroom
Copy link

boyintheroom commented Apr 21, 2023

Make change on requirements = replace jnius with pyjnius and also android.gradle_dependencies = com.google.firebase:firebase-ads:19.8.0 or any lower version

But by july versions <20.0 will be dead disabled. They currently are deprecated. Hi, @mulivham. my friend can you help us with new code for rewarded and interstitial ads for version >20.0

@mulivham
Copy link

Make change on requirements = replace jnius with pyjnius and also android.gradle_dependencies = com.google.firebase:firebase-ads:19.8.0 or any lower version

But by july versions <20.0 will be dead disabled. They currently are deprecated. Hi, @mulivham. my friend can you help us with new code for rewarded and interstitial ads for version >20.0

Still looking for a solution too, and i've also realize that even people from other cross-platform like Native React are facing the same issue.

i'll notify you if i've found some solution , for now 19.8.0 version it's working perfectly with Admob even after they showed me a warning on Google play console

@iruriksl
Copy link

I m also facing the same issue.

On troubleshooting I found that the main reason is at "kivmob.py", line 221, in __init__
This is found in debug logs. That means kivmob is unable to initialize MobileAds.initialize().

Following is the source code extract of the same file for reference.

220        try:
221            MobileAds.initialize(activity.mActivity, appID)
222
223        except ValueError as error:
224           print(error)
         

I tried with plaving project google-services.json & re-build & run but no success.

Hi @kivmob expert team, can u guide what needs to be done to get MobileAds.initialize done.

@boyintheroom
Copy link

Make change on requirements = replace jnius with pyjnius and also android.gradle_dependencies = com.google.firebase:firebase-ads:19.8.0 or any lower version

But by july versions <20.0 will be dead disabled. They currently are deprecated. Hi, @mulivham. my friend can you help us with new code for rewarded and interstitial ads for version >20.0

Still looking for a solution too, and i've also realize that even people from other cross-platform like Native React are facing the same issue.

i'll notify you if i've found some solution , for now 19.8.0 version it's working perfectly with Admob even after they showed me a warning on Google play console

Any News, my friend?

@izchak333
Copy link

have same problem i try many many thing to do nothing work
someone know if there is a solution ?
or it better to move to Flutter and learn all from basic
and avoid good repo that not udate ?

@CatchHell
Copy link

I followed this guide and it worked! All credit goes to this person.

https://vucavucalife.com/kivy-trials-and-tribulations-of-integrating-admob-ads-into-an-android-app/

@iruriksl
Copy link

iruriksl commented Jun 8, 2023

I followed this guide and it worked! All credit goes to this person.

https://vucavucalife.com/kivy-trials-and-tribulations-of-integrating-admob-ads-into-an-android-app/

Thanks for the insightful link.
I was thinking of modifying kivmob.py and it was wonderful job done.

@salvecom333
Copy link

God bless that japanese man, it works! now i'm going to implement this to my app. I've been trying to get this to work for the past two days. Thank you!

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

8 participants