Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Error updating google play services in plugin ads to 20.0.0 — Gideros Forum

Error updating google play services in plugin ads to 20.0.0

please help

Error updating google play services in plugin ads.

I recently uploaded an app to google play... and everything is fine,

I am using in the ads plugin
"google play services version": 16.0.0

and GIDEROS 2023.1


but I get the following "warning":



Caveat
The person behind the development of the Google Mobile Ads (GMA) SDK (com google android gms:play-services-ads) added the following note to SDK version 16.0.0:

This version is officially deprecated, and will soon disable ad loading. Please update to a new version. See hhtt developers.google.com/admob/android/deprecation for more details.

recommend using a version above 20.0.0

but when I put 20.0.0 in plugin ads and in plugin gaming

I get errors and it doesn't build the apk or abb...

I get these errors...:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
> Could not find com.google.android.gms:play-services-games:20.2.0.
Searched in the following locations:

"
- jcenter bintray com/com/google/android/gms/play-services-games/20.2.0/play-services-games-20.2.0.pom
- maven google com/com/google/android/gms/play-services-games/20.2.0/play-services-games-20.2.0.pom
"

- file:/E:/apps_2023_generadores/_guess generados/ferrodqui_guess the movie/export/ferrodqui_guess the movie/tmp/app/libs/play-services-games-20.2.0.jar
- file:/E:/apps_2023_generadores/_guess generados/ferrodqui_guess the movie/export/ferrodqui_guess the movie/tmp/app/libs/play-services-games.jar
Required by:
project :app

*Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at help gradle org

BUILD FAILED in 5s
Exec returned: 1
Export failed! See details above.


Moving the parameters a bit, setting it to 19.0.0 seems to be accepted, but I get several errors, more related to the plugin, for example:

: error: package com.google.android.gms.ads.reward does not exist
import com.google.android.gms.ads.reward.RewardItem;

error: cannot find symbol
private RewardedVideoAd mRewardedAd = null;
^
symbol: class RewardedVideoAd
location: class AdsAdmob
E:\apps_2023_generators\_generated puzzles\ferrodqui_image puzzle - copy\export\copy_image puzzle\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsAdmob.java:35: error: cannot find symbol
private InterstitialAd interstitial = null;

and other..

please help

Is someone compiling with version 20.0.0 or higher in google play services version in the ads plugin?

They are integrating ADMOB to their projects with a version greater than 16.0.0

how can it be done if anyone knows I will be very grateful

Greetings.

Comments

  • MoKaLuxMoKaLux Member
    edited February 2023 Accepted Answer
    gideros afaik is still using 16.0.0
    You can keep it at 16.0.0 until google really deprecates it or you notice no ads showing up?
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • yes
    thanks for reply...

    I m use 16.0.0

    just now I uploaded an app to the play store with 16.0.0

    but the notice says that in the next few months it will stop working...

    I just wanted to take forecasts..

    and I don't know much about plugins... I wanted to know if someone could already update the plugin
    Or do we have to wait for it to be included in a future update of Gideros?
  • hgy29hgy29 Maintainer
    I can try to update the plugin code to something more recent, but I don't use GMA myself so I can't easily check for real.
  • hgy29hgy29 Maintainer
    edited February 2023
    Has anyone the necessary set up to check AdMob using SDK 21.5.0 ?
    I chaned the AdsAdmob.java file but I don't have a google admob account to go further (and I don't want to create one just for the purpose of testing).
    Here is the patched AdMob plugin.
    https://github.com/hgy29/gideros/blob/master/plugins/ads/source/Android/src/com/giderosmobile/android/plugins/ads/frameworks/AdsAdmob.java

    Likes: pie, MobAmuse

    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29 said:

    Has anyone the necessary set up to check AdMob using SDK 21.5.0 ?
    I chaned the AdsAdmob.java file but I don't have a google admob account to go further (and I don't want to create one just for the purpose of testing).
    Here is the patched AdMob plugin.
    xxxx //github.com/hgy29/gideros/blob/master/plugins/ads/source/Android/src/com/giderosmobile/android/plugins/ads/frameworks/AdsAdmob.java

    hi
    thanks @hgy29 thanks for taking care of the code...

    I tried with the plugin that you updated, copying it to the plugins folder indicated in hithub.
    but I still get the error to compile for android:

    "
    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:mergeReleaseResources'.
    > Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
    > Could not find com.google.android.gms:play-services-auth:21.5.0.
    Searched in the following locations:
    - jcenter.bintray.com/com/google/android/gms/play-services-auth/21.5.0/play-services-auth-21.5.0.pom
    - maven.google.com/com/google/android/gms/play-services-auth/21.5.0/play-services-auth-21.5.0.pom
    - file:/E:/apps_2023_generadores/_puzzle generados/ferrodqui_image puzzle - copia/exportar/copia_image puzzle/tmp/app/libs/play-services-auth-21.5.0.jar
    - file:/E:/apps_2023_generadores/_puzzle generados/ferrodqui_image puzzle - copia/exportar/copia_image puzzle/tmp/app/libs/play-services-auth.jar ...

    and more...


    Please to test you don't need an admob account, you can use the test codes of ADMOB:

    Formato de anuncio ID del bloque de anuncios de prueba

    Carga de aplicación ca-app-pub-3940256099942544/3419835294
    Banner ca-app-pub-3940256099942544/6300978111
    Intersticial ca-app-pub-3940256099942544/1033173712
    Intersticial de vídeo ca-app-pub-3940256099942544/8691691433
    Bonificado ca-app-pub-3940256099942544/5224354917
    Intersticial bonificado ca-app-pub-3940256099942544/5354046379
    Nativo avanzado ca-app-pub-3940256099942544/2247696110
    Vídeo nativo avanzado ca-app-pub-3940256099942544/1044960115

    Fill in the test codes plugin and if everything goes well it shows test ads.


    Very grateful if you can do the test and tests..

    I couldn't, I always get an error. I still don't have deep knowledge to know where I'm failing.

    Thank you very much for the effort..

    greetings.
  • hgy29hgy29 Maintainer
    So I finally gave it a go today, and the plugin compiles fine the project runs, but I only get 'no fill' from google when trying to load ads using test app id and test ads id. this is probably a configuration issue but I don't know where to start...
  • I got this today too for the same reason while I was updating an app. Last time I tried higher than 16.0.0 I got crash on boot with all my AppLovinMAX Ads apps.

    I just downloaded the latest Gideros so will give it a spin higher than 16.0.0 shortly and then report back here.

    ---

    com.google.android.gms:play-services-ads-lite:16.0.0
    This SDK version has been reported as outdated. Consider upgrading to a newer version (19.2.0+).

    com.google.android.gms:play-services-ads:16.0.0
    This SDK version has a note from the SDK developer. Here's what the SDK developer told us:

    This version is officially deprecated, and will soon disable ad loading. Please update to a new version. See https://developers.google.com/admob/android/deprecation for more details.

    This SDK version has been reported as outdated. Consider upgrading to a newer version (19.2.0+).
  • Still crashes on boot when trying above 16.0.0 with latest gideros.
  • Logcat...

    FATAL EXCEPTION: main
    Process: com.mobileamusements.TropicalTreasures2FREE, PID: 8319
    java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:

    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
    * should follow the instructions here: *
    * https://googlemobileadssdk.page.link/admob-android-update-manifest *
    * to add a valid App ID inside the AndroidManifest. *
    * Google Ad Manager publishers should follow instructions here: *
    * https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
    ******************************************************************************


    at android.app.ActivityThread.installProvider(ActivityThread.java:8346)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:7846)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7595)
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2402)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8775)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
    Caused by: java.lang.IllegalStateException:

    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
    * should follow the instructions here: *
    * https://googlemobileadssdk.page.link/admob-android-update-manifest *
    * to add a valid App ID inside the AndroidManifest. *
    * Google Ad Manager publishers should follow instructions here: *
    * https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
    ******************************************************************************


    at com.google.android.gms.internal.ads.zzya.attachInfo(com.google.android.gms:play-services-ads-lite@@19.0.0:27)
    at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite@@19.0.0:3)
    at android.app.ActivityThread.installProvider(ActivityThread.java:8341)
    ... 11 more
  • hgy29hgy29 Maintainer
    Hi @MobAmuse, did you enable AdMob in ads plugin settings alongside Applovin ?

    Likes: MobAmuse

    +1 -1 (+1 / -0 )Share on Facebook
  • No I use AppLovin but I can try that 2moz and report back no probs.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • OK sadly I cannot try that as I updated to Android Studio 'Electric Eel' and now get this (below) on export, so I'm unable to build to test further LOL :pensive: It was OK to build before I moved to the latest Android Studio tho. doh!

    The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Android\Android Studio2\jre\bin\java.exe
  • hgy29hgy29 Maintainer
    Yes, it just updated my Android Studio too and java folder has been moved to jbr instead of jre. Here is a fixed APK.gexport file: https://github.com/gideros/gideros/blob/master/ui/Templates/APK.gexport

    Likes: MobAmuse, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
  • OK coolness! will check it out 2moz and report back regards the other ads stuff tests after.

    Thanks

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MobAmuseMobAmuse Member
    edited February 2023
    OK firstly, export is now working again with Electric Eel, thanks.

    When I export a test .apk with Google Play Services 19.0.0 with AdMob selected alongside AppLovin in Ads/Plugins I get 35 errors like...

    \Temp\TropicalTreasures2\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsAdmob.java:422: error: cannot find symbol
    GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
    ^
    symbol: variable GoogleApiAvailability
    location: class AdsAdmob


    I tried with the updated AdsAdmob.java above too.

    I've not used AdMob before so unsure if I missed something. I'm more of an AppLovin dude :)
  • hgy29hgy29 Maintainer
    I tried with 21.5.0 and didn't have this issue, but I may have been lucky

    Likes: MobAmuse

    +1 -1 (+1 / -0 )Share on Facebook
  • OK so I moved to Google Play Services 21.5.0 and it's now exported OK with both AdMob and AppLovin Plugins ticked but still crashes on boot...

    I don't have an AdMob account but it moans about having an Invalid application ID

    I don't want to have to setup AdMob to use just AppLovin of course.

    I'm not sure I understand what the actual problem is here.

    FATAL EXCEPTION: main
    Process: com.mobileamusements.TropicalTreasures2FREE, PID: 6207
    java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:

    ******************************************************************************
    * Invalid application ID.
  • hgy29hgy29 Maintainer
    I have to say I don't understand the relation between AppLovin and AdMob here, obviously apploving tries to use AdMob internally to serve google ads, but Ad mob requires an app id to be set in the manifest, the ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy value called AdMob client id in ads plugin. I wonder how you are supposed to get one for app lovin

    Likes: MobAmuse

    +1 -1 (+1 / -0 )Share on Facebook
  • This is a right PITA :)

    I since setup an AdMob account with above app as a test and it all now works.

    Thank you tho.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • Yes it's really odd. I guess the way it is now, is that Google get to be the 'gatekeeper' regards serving all ads on all Android apps on the Google Play store. I imagine they can just switch off ad serving as they see fit, even if they are only AppLovin Ads as an example, as they control it all via Google Play Services. Just my guess.
Sign In or Register to comment.