1
\$\begingroup\$

Im currently trying to implements AdMob into my libgdx game, but it seems that all tutorials are deprecated.

For example in the offical libgdx wiki the google play services get imported into eclipse, but google split the google play services up. Also I need to implement Firebase to the game (u need to now), but it doesnt say anything about that either. I also looked at the offical tutorials for Android Studio, but doing it in LibGDX doesnt seem to work (Cant resolve AdView).

All help is appreciated, thanks.

\$\endgroup\$
  • \$\begingroup\$ What do you mean by 'google split services up'? If you make a clean GDX project and use the wiki step by step, you'll get a working ad-mob, I've tested it couple days ago ;) Firebase will be a little bit harder cause you will need to write it yourself and plug it to your app, but if you understand how to write platform specific code - it'll be easy. Take a look in here: github.com/libgdx/libgdx/wiki/… All you need to do is implement Firebase and connect it with your app with the guide I linked (platform specific). \$\endgroup\$ – Jacob Dec 2 '16 at 22:27
  • \$\begingroup\$ @Spectre Dont you have to use firebase when wanting to do AdMobs? Because you need to add this line compile 'com.google.firebase:firebase-ads:10.0.1' \$\endgroup\$ – zebleckDAMM Dec 2 '16 at 22:47
1
\$\begingroup\$
  1. Sign in the "firebase"
  2. Go to My Projects page (if you have not, create new one then)
  3. Click "Add firebase to your Android app" icon
  4. Fill the necessary blank.
    • Copy and paste your app' packagename
    • Copy and paste your app' SHA1 signing
  5. Move the google-play-services.json file (which will automatically donwload) to your project > app directory .
  6. Go your project's build.gradle file and paste the classpath line to your dependencies. (which google will give you like "classpath 'com.google.gms:google-services:3.0.0")
  7. Go your app build.gradle file and paste the line compile 'com.google.firebase:firebase-core:10.0.1' to your dependencies.
  8. Go your app build.gradle file and paste the apply-plugin line to bottom of file. (apply plugin: 'com.google.gms.google-services')
  9. Finally click the sync now.

NOTE : Don't forget the use most recent versions. Check the link below.

https://firebase.google.com/docs/android/setup

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.