Android Working on an Android extension and need help

Discussion in 'Legacy GameMaker Community Tech Support' started by Ziphold, Apr 4, 2018.

  1. Ziphold

    Ziphold Member

    Joined:
    Jun 22, 2016
    Posts:
    103
    Good day!
    I'm trying to implement the latest AdMob's rewarding video ads into my game. Frankly, I don't even care if user watched the whole ad, my focus is just displaying it. The official documentation is quite good, so as far as Java programming goes, I don't thing I would have any issues.

    This is the tutorial link (Just setting up ads)

    Setting things up to work with gamemaker is my weak spot. Following the first lines of the tutorial, I added the following text to "Inject to gradle dependencies" in Extension properties tab:
    Code:
    compile 'com.google.android.gms:play-services-ads:12.0.1'
    This is the message my compiler tells me when I run the app:
    Code:
    A problem occurred configuring project ':com.companyname.rewardTest'.
    > Could not resolve all dependencies for configuration ':com.companyname.rewardTest:_debugApkCopy'.
       > Could not find com.google.android.gms:play-services-ads:12.0.1.
         Required by:
             project :com.companyname.rewardTest
    
    I think this is happening because I didn't add the Maven directive. This is the example the official documentation shows:
    Code:
    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    But where do I add this? Build.Gradle? When I open game maker's build.gradle file in Appdata/Roaming, there is nothing in the lines of repositories { } where I could add the Maven directive.

    If anyone has experience with android extensions and setting things up please help.
    Also, if anyone tried to implement Google Reward ads, I would be really thankful if that person shared some of their code.

    In advance, thank you.
     
  2. Wraithious

    Wraithious Member

    Joined:
    Jun 24, 2016
    Posts:
    1,165
    Hello, many many people have had issues with admob, I highly recommend Unity ads by Hanul it's definitely working nice and is free and very simple to set up, there's only like 2 or 3 functions. It's not in english so just click the translate page button when you visit the marketplace link.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice