Error Creating Apk In Android Studio (could Not Find Play-services-ads.aar...)

Discussion in 'Technical Discussion' started by phuceh, Nov 20, 2018.

  1. phuceh

    phuceh Boxer

    Joined:
    Nov 20, 2018
    Messages:
    66
    Likes Received:
    9
    Hello,

    I have followed the tutorial at the below link to the letter which illustrates how to create a signed APK using Android Studio. I am even using the same version of Android Studio as used in the link (3.1.2).
    http://help.buildbox.com/exporting/creating-signed-apk-with-android-studio

    The error message I am getting when the APK build is attempted is as follows -

    Could not find play-services-ads.aar (com.google.android.gms: play-services-ads:12.0.1).
    Searched in the following locations:

    https://jcenter.bintray.com/com/google/android/gms/play-services-ads/12.0.1/play-services-ads-12.0.1.aar

    Does anybody know what this means and how to fix it?

    Thanks in advance for your time.
     
  2. Josh (Nology Games)

    Josh (Nology Games) Head Moderator Staff Member

    Joined:
    Nov 27, 2017
    Messages:
    570
    Likes Received:
    190
    I'm not sure what would cause that. Are you fully up to date with buildbox? Also, did you play around with the code for ads at all?
     
  3. phuceh

    phuceh Boxer

    Joined:
    Nov 20, 2018
    Messages:
    66
    Likes Received:
    9
    Thanks for your reply. I am using Buildbox 2.3.5. Do you suggest I update to 2.3.6?

    Within Buildbox I have added IDs for AdMob Banner and Interstitial ads - but haven't changed any code within Android Studio - I wouldn't know how to!
     
  4. The Pumpkin Studios

    The Pumpkin Studios Moderator

    Joined:
    Sep 25, 2018
    Messages:
    25
    Likes Received:
    10
    Hi @phuceh Yes, i am using 2.3.6 at the moment, and i can export to it, completely fine. Here are a few suggestions.
    (Hoping you know a tiny bit knowledge of android studio / Programming. If not, no worries)

    Try them 1 by 1. if 1 fails, then 2, etc.

    1. Do not update the gradle to the latest version. that would not create conflicts and solve your problems with ease
    2. Check if your appmanifest.xml file got created or not. if it did, then 85% of your problems are solved.
    3. Check your maven repositories. you can go to Build.gradle (both of them) and see if your google play services is up to the current version (changing the numbers to higher values will solve it, android studio itself gives you tooltips on what is the current version)

    Also, feel free to join our discord, you can find good links in FAQ and Useful Links sections to help you out.

    If everything fails, i do have a backup strat but lets hope this gets fixed without it.
     
  5. phuceh

    phuceh Boxer

    Joined:
    Nov 20, 2018
    Messages:
    66
    Likes Received:
    9
    @The Pumpkin Studios I really appreciate you taking the time to contribute here. Although I am not that technical with Android Studio nor with Programming, I will give your suggestions a go. Firstly I will update to Buildbox 2.3.6 and see if this works.

    Regarding your first point - I don't recall actively upgrading the gradle to the latest version. Is this something I would need to perform, or does Android Studio ask to do this automatically? Not having done this I imagine I can ignore this point?
     
  6. adityarevankar

    adityarevankar Boxer

    Joined:
    Mar 29, 2019
    Messages:
    9
    Likes Received:
    0

Share This Page