Google has a local repository where you can find Google Play Services dependencies. For ads
, you can find the .aar
file under:
<ANDROID_HOME>/extras/google/m2repository/com/google/android/gms/play-services-ads/<version>/play-services-ads-<version>.aar
where ANDROID_HOME
has been added to the gradle.properties
file, with the path to the Android SDK, and <version>
should be replaced with the number of ads version, i.e. 9.4.0.
Adding explodeAarDependencies
to your build.gradle file takes care of finding that aar
file, and extracting the jar and other required files, into an exploded
folder:
<ANDROID_HOME>/extras/google/m2repository/com/google/android/gms/play-services-ads/<version>/exploded/play-services-ads-<version>.jar
You can find more about that task here.