Repo not found Unity Admob Plugin - android

I want to implements ads in my little android game that I am making in unity. I followed the steps here for the implementation of the admob unity plugin: https://firebase.google.com/docs/admob/unity/start
However, after I wrote my banner ad code, I cannot build the app anymore, because I am receiving the following errors:
Repo not found: C:\Android\extras\google\m2repository
Error: Unable to find dependency com.google.android.gms play-services-ads LATEST in ($SDK\extras\android\m2repository, $SDK\extras\android\m2repository)
I went and looked into the directory and I do not have the m2repository folder. So I am guessing I have to get it from somewhere, but I do not know where.

Install this packages in Android SDK Manager (GUI).
Android Support Repository.
Google Play Services
Google Repository (this have m2repository)

Related

Error failed to resolve: compile 'com.google.android.gms:play-services-cast-framework:9.4.0'

tried to build a sample project after downloading from github.
But some errors showed up. Others solved but Couldn't resolve above issue mentioned in title.
Cast framework is required for this project but can't find it even after searching in project structure, shows nothing.
What can I do to resolve this issue?
Thanks.
Make sure you have set up Google Play Services SDK.
Start Android Studio
On the Tools menu, click Android > SDK Manager.
Update the Android Studio SDK Manager: click SDK Tools, expand Support Repository, select Google Repository, and then click OK.
The latest version of play services is 10.0.1. Under the buid.gradle of your application module, write:
dependencies {
compile 'com.google.android.gms:play-services-cast:10.0.1'
}
and click on Sync.

Add Firebase to Android app

I'm trying to install Firebase to my Android app, but it's seems like I'm doing something wrong. I have done exactly the same what I saw in this tutorial.
But when I put this compile 'com.google.firebase:firebase-core:9.6.1' into my project, I'm getting this error message:
Could not fint support-annotations.jar.....
The tutorial says something about this error:
Getting a "Could not find" error? Make sure you have the latest Google Repository in the Android SDK managerĖ›
The problem with this is that I have the latest version of Google Repository. And I cannot update it because there is no update available in SDK Manager.
Do you have you any idea what can I do to solve this?
In the Extras section of the Android SDK Manager, make sure the Android Support Library (v23.2.1) and Android Repository (v38) are installed and up to date.
The Support Annotation Library is described here.
The tutorial tip referring to the Google Repository applies when the "Could not find" error is for one of the Firebase libraries.
I had to update android studio and gradle plugins. After that everything works fine.

I am not getting 'com.google.android.gms:play-services-wallet:8.4.0' update for Google play services in sdk

I have updated my Android SDK completely still I am not getting update for Google play services version 8.4.0 i.e. 'com.google.android.gms:play-services-wallet:8.4.0' like mentioned in the link for implementing Android Pay https://developers.google.com/android-pay/android/tutorial.
Whenever I add this line : "compile 'com.google.android.gms:play-services-wallet:8.4.0'" in build.gradle, I got following error : Failed to resolve: com.google.android.gms:play-services-wallet:8.4.0
After encountering the error you will be given three choices by Android Studio
Install repository and sync project
Show in File
Show in Project Structure dialog
You just have to click 'Install repository and sync project'. After that, it worked fine for me.
It didn't work for me too. I guess it just wasn't available yet.
But the following implementation is now working for me:
apply plugin: 'com.android.application'
...
dependencies {
compile 'com.google.android.gms:play-services-wallet:8.4.0'
}
I'm currently trying to make an App using Android Studio and had the same issue.
Resolved it by starting Android Studio as administrator on my windows machine and letting gradle resync (just rebuild the project).
hope anyone finds this useful. ;)
This issue is been fixed after installing all the latest versions of build tools and other updates, Now I got updates of this library and its working fine.

Cannot resolve com.google.android.gms:play-services-base:6.5.+

I launched my android studio and found that the following lines in the dependencies section of build.gradle are not compiling:
compile 'com.google.android.gms:play-services-base:6.5.+'
compile 'com.google.android.gms:play-services-identity:6.5.+'
Gradle Sync tells me that it cannot resolve the packages. I know the newest version of play-services is 7.8.0 but I'm not sure if this is related to that in any way. Any advice?
EDIT: I should mention that if I use 7.8.0, gradle does not complain, as it can find the package. However the methods I am using in my app that pertain to play services become invalid, as Google has updated how their Cloud Messaging works.
In the folder
Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-base open the maven-metadata.xml file
and add the <version>6.5.87</version> under section <versions>. It may look like below
<versions>
<version>6.5.87</version>
<version>7.0.0</version>
<version>7.3.0</version>
<version>7.5.0</version>
</versions>
Do the same for Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity
Note: Usually Android SDK in your HOME folder.
You probably need to download the play services package.
Go to Tools -> Android -> SDKManager
In the Extra section at the bottom of the list, make sure you have Google Play Services marked as installed.
If you use the latest android studio, once you open the SDKManager, go to the SDK Tools and make sure Google Play Services is checked.

Android Studio import Google Play Services project refresh failed

currently I'm trying to import the Google Play Services for my Android project which is created using Android Studio. Now, I read the part where I should start from here and since this one is still using Eclipse I ended up in these steps. Now upon adding the Google Play Services on my app I receive an error saying:
Gradle 'MyApp' project refresh failed:
Could not find com.google.android.gms:play-services:5.0.77.
Required by:
MyApp:myapp:unspecified
So I tried changing the versions on this line:
compile 'com.google.android.gms:play-services:5.0.77'
into:
compile 'com.google.android.gms:play-services:5.0.+',
compile 'com.google.android.gms:play-services:4+',
compile 'com.google.android.gms:play-services:4.0.+',
so on but still getting the same error (only the version changes).
As for reference my Android Studio Version is currently # 0.5.2 (I cant update yet)
Grade ver 0.9.+.
And the screenshot of my installed packages in Android SDK Manager:
Now I'm wondering where exactly my problem is. And additionally I don't want to download a JAR file of the Google Play Services to solve this. I want to stick on the official way for implementing this in Android Studio. :D
Install Google Repository from the SDKManager.If you can't find Google Repository then update your SDK Tools,SDK Platform Tools,SDK Build Tools from the Tools section

Categories

Resources