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:unspecifiedAm 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?
Comments
What steps exactly am I supposed to take in order to change the version of the google services?
https://deluxepixel.com
https://deluxepixel.com
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!
"Failed to resolve: com.google.android.gms:play-services-ads:16.0.0"
This was the result of me messing with Android Studio
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
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.
https://deluxepixel.com
https://deluxepixel.com
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
Likes: misterhup, SinisterSoft
"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)
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?
- 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.
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.
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.
https://deluxepixel.com
Likes: SinisterSoft, misterhup
"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)