Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Building failed — Gideros Forum

Building failed

Hello! So I've ran into a problem. It's my first time dealing with ads and admob in particular. I tried to add ads to a simple game I've made. Read up on it, works great on the Gideros Player with the ads plugin but when I try to export the app (via Gideros) I run into this:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android.gms:play-services-ads:9.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-ads/9.2.0/play-services-ads-9.2.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-ads/9.2.0/play-services-ads-9.2.0.jar
file:/F:/Gideros/Exportate/lbb/adsadsafads/Long Bunny Boi/tmp/app/libs/play-services-ads-9.2.0.jar
file:/F:/Gideros/Exportate/lbb/adsadsafads/Long Bunny Boi/tmp/app/libs/play-services-ads.jar
Required by:
tmp:app:unspecified
> Could not find com.google.android.gms:play-services:9.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.jar
file:/F:/Gideros/Exportate/lbb/adsadsafads/Long Bunny Boi/tmp/app/libs/play-services-9.2.0.jar
file:/F:/Gideros/Exportate/lbb/adsadsafads/Long Bunny Boi/tmp/app/libs/play-services.jar
Required by:
tmp:app:unspecified


Am I missing something obvious? (probably)

This is the part that deals with the ads in my main (I changed the key and ID for this example, but I can assure you that the ones from my code are correct.)

require "ads"
admob=Ads.new("admob")
admob:setKey("ca-app-pub-3940256099942544/1033173712")

admob:loadAd("banner", "ca-app-pub-3940256099942544/6300978111")

admob:addEventListener(Event.AD_RECEIVED , function (event)
print(event.type, "ad received")
if event.type=="banner" then admob:showAd("banner") admob:setAlignment("center","bottom") end
end)


Help?
Tagged:

Comments

  • hgy29hgy29 Maintainer
    You should use version 16.0.0 of google services, anything lower is no longer available from google
  • Seems like I have the same problem. Maybe I take the wrong approach when setting up the google services version?
    What steps exactly am I supposed to take in order to change the version of the google services?
  • Go to the ads plugin's properties and you will see a setting for the google play services version to use.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • I did, I changed it and still I get the same error.
  • Have you run Android Studio, and made sure you have the latest SDK and tools installed?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Ok so I took some screenshots. I'm pretty confused about this whole thing and I hope these can help someone explain me what is going on, because I swear I've tried everything.



    This is just to show that I have the ads plugin. The other I don't even know if they are necessary, as they break on export anyway


    I literally went and tried pretty much everything there. Tried to update everything, then change, change and check, nothing and nothing and nothing. Same type of error


    This is more to show the target version if that has to do with anything. The paths are irrelevant because again, as I said, I did export the game without ads and everything went fine









    And finally, this is the thing that keeps poping up

    Now I understand that there might be something obvious. Again, this is my first time dealing with admob. (Also it should be worth mentioning that the app works fine on the phone via the gideros player. I even tried it with the example ads and they were displayed. Same error at exporting though). On top of that, I have the app up on google play's internal testing server, so I am certain the problem is not tied with my app or the google services side.

    So yeah, pretty confused about this whole thing. I appreciate anyone trying to help. I'll try to export it via Android Studio from scratch, see if I manage to pull it off.
    Thanks in advance!
    3.png
    378 x 146 - 11K
    2.png
    677 x 507 - 26K
    1.png
    794 x 486 - 24K
    5.png
    650 x 416 - 30K
    4.png
    626 x 860 - 72K
    6.png
    609 x 1001 - 61K
    3.png 10.8K
    2.png 25.8K
    1.png 24.3K
    5.png 29.9K
    4.png 72.3K
    6.png 60.5K
  • Ok so everything I do leads me to this:
    "Failed to resolve: com.google.android.gms:play-services-ads:16.0.0"
    This was the result of me messing with Android Studio
  • New update on the situation: things are worse than I thought. After about 8 hours of spelunking in the depths of stackoverflow I may have found the problem. Essentially, there is not just one problem. There's something wrong with everything from the gradle up to the ad class itself. I messed A LOT with the android studio code and ran from an error to another almost endlessly. The problem is that I am still confused about what is going on. It seems that there is more than just one problem here which makes it difficult to pin point one particular issue and fix it, because another one always pops up.

    Here is a link I found particularly useful about the same exact issue I'm facing:
    https://stackoverflow.com/questions/45692460/failed-to-resolve-com-google-android-gmsplay-services-in-intellij-idea-with-gr

    I am slowly going mad, any tips on how I can avoid all of these are appreciated :s
  • @misterhup You need to set box 7,8,... to empty strings in the export.

    See the 4th screenshot in this blog post:
    http://blog.giderosmobile.com/2018/05/whats-in-upcoming-20186-release.html

    That way it will use the latest libs from Android Studio. The libs you are pointing to may be too old.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • SinisterSoftSinisterSoft Maintainer
    Accepted Answer
    Just have the gaming plugin, not the google play services plugin.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    Accepted Answer
    That may sound obvious, but are you using latest gideros (2018.10). Are you using android studio 3.2 ?
  • Ok so I got it to work!!
    Updated Gideros to the latest version, but kept getting the same errors except the gradle one which got fixed because of that (pretty obvious looking back now). Then I removed the google play services but retained the gaming one as Sinister pointed out and everything worked like a charm. :)
    Thanks a lot for the help and patience!

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • 'Google Play Services' plugin is deprecated, probably it should be removed from the Gideros repo to avoid such confusions.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
    +1 -1 (+2 / -0 )Share on Facebook
  • I'm late to the party v(as per usual) but when you are using plugins that require the App ID.. it's not com.whatever.game.. it's the App ID from the Google Play Developer Console that is unique to that App ;)
  • @antix but isn't the ID exactly something like com.whatever.game? ( for me was com.hupspace.longbunnyboi, which I did take from the Google Play Developer Console)
    I looked up App Id and that's what I ended up with.
    If that is not it, where can I find it?
    And does it matter if the app is published just internally?
  • antixantix Member
    edited November 2018
    @misterhup To find the ID..
    - Go to Google Developer Console
    - Click 'Game Services' in left pane
    - Click game title in right pane
    Now near the top, underneath the game title.. you will see the App ID.

    Personally I think that it should crash with the wrong ID because in theory that's important and is required for the plugin to function correctly.
  • @antix Ok. That makes a lot of sense now. Problem here is that the project exports only without the Google Play Services Plugin, which throws out an error when exporting with. Should my app work without it? I am still confused about the whole thing. ( I have the Ads and Gaming Plugins)

    So yes, I found the ID, configured my stuff there, used the correct ID this time, exported the game to the internal channel, yet the moment I open my app, it closes.
    Have you used the latest version of Gideros to export something? What version of Google Play Services are you using or recommend me to try ( tried 16.0.0 and 9.2.0 mainly)
    If the problem is indeed the Google Play Services Plugin, what do you think I should do?
    Where can I find an older version? if that is the problem

    And also, thank you a lot for help, I'm actually starting to understand what is going on here.
  • @misterhup I don't use Google Play Services anymore, it has been depreciated. I just use AdMob, iab, and Gaming plugins which covers all googley type things.

    I recently upgraded both of my Descent games using 2018.10 and they both work fine.. I'm using only small banner ads in one of them though.
  • SinisterSoftSinisterSoft Maintainer
    edited November 2018
    @misterhup - use 16.0.0 and the gaming plugin - not the play services plugin.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @misterhup plugin 'Gaming' has all the functionality that was in deprecated 'Google Play Services' plugin, plus more.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.