After Google Play Service update to version 13 I got an error
You need to add the following in your manifest:
<application>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
...
</application>
EDIT:
This information can be found in the logcat error msg as well as on Setting Up Google Play Services (Thanks Brais Gabin)
Google Play Services v13 error meta-data in AndroidManifest
The Google Maps getting started guide says:
Add the Google Play services version to your app's manifest
Edit your application's AndroidManifest.xml file, and add the
following declaration within the element. This embeds
the version of Google Play services that the app was compiled with.
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
How to fix google play service error
One of your dependency is having different version of com.google.android.gms
.
Update
Firebase dependencies are having independent versions unlike past. If
you have version conflicts then you can update your
com.google.gms:google-services
. and start defining independent
version.
Update com.google.gms:google-services
Go to top (project) level build.gradle and update
com.google.gms:google-services
to version4.1.0
or newer if available.
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0' //< update this
}
}
Update Firebase dependencies to Latest Versions
Firebase dependency versions can be individual. So check Latest Versions.
com.google.firebase:firebase-core:16.0.3 //Analytics
com.google.firebase:firebase-database:16.0.2 //Realtime Database
Orignal Solution (Useful)
Ways to resolve:
- Exclude
com.google.android.gms
from conflicted dependency. - Update that dependency if available.
- Change your
com.google.android.gms
version as conflicted version.
Problem
how to see which dependency is using com.google.android.gms
?
1. Solution by command
For Android, use this line
gradle app:dependencies
or if you have a gradle wrapper:
./gradlew app:dependencies
where app
is your project module.
Additionally, if you want to check if something is compile
vs. testCompile
vs androidTestCompile
dependency as well as what is pulling it in:
./gradlew :app:dependencyInsight --configuration compile --dependency <name>
./gradlew :app:dependencyInsight --configuration testCompile --dependency <name>
./gradlew :app:dependencyInsight --configuration androidTestCompile --dependency <name>
2 Use these plugins
Gradle View is an Android Studio plugin that you can install and show dependency hierarchy.
Methods Count is another plugin, it also shows dependency tree.
Error after upgrade Google Play Services to 11.0.0 version
You should delete the line apply plugin: 'com.google.gms.google-services'
Because apply plugin: 'com.android.application'
already has same package.
That's where the conflict arises.
UPDATE:
Use Play services version 11.0.1
Google Play Services update
This worked for me:
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
Place this at the end of your manifest, after your Map API key meta-data tag. Since you check for GPlayServices availability in your onCreate method, such as:
// Check status of Google Play Services
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
// Check Google Play Service Available
try {
if (status != ConnectionResult.SUCCESS) {
GooglePlayServicesUtil.getErrorDialog(status, this, RQS_GooglePlayServices).show();
}
} catch (Exception e) {
Log.e("Error: GooglePlayServiceUtil: ", "" + e);
}
...then once you click the dialog box to update GPlayServices, you will be brought to the GPlayStore. Usually, I uninstall from the GPlayStore menu, then the option to update will be available. It should work after that.
Google Play Service out of date error
I think there is an open issue about the error that you receive "Google Play Services out of date on API 23" Also, this kind of issue came out during 2013 when you update your SDK to 18. Just check the link of this issue to know more about it.
What can I suggest you is update your dependency on the latest version. After you update it, create a new virtual device/emulator when testing the application. Try to use the x86-64 version of API 23.
Play Store Warning : play-services-safetynet (com.google.android.gms:play-services-safetynet) has reported critical issues with version 17.0.0
com.google.gms:google-services
itself has contained safetyNet API. As you see in version of gg services to latest 4.3.13, it has
safetyNet ver 18.0 and it's OK.
https://developers.google.com/android/guides/setup#list-dependencies
How to suppress the "Avoid using bundled version of Google Play services SDK" warning?
https://developers.google.com/android/guides/releases
Related Topics
Access Private Field of Another Object in Same Class
Android - Get Real Path of a .Txt File Selected from the File Explorer
How to Display Data from Firestore in a Recyclerview With Android
How to Get Latitude and Longitude of the Mobile Device in Android
Distinguishing Between Java Threads and Os Threads
How to Round a Number to N Decimal Places in Java
Loading Resources Like Images While Running Project Distributed as Jar Archive
How to Avoid Arrayindexoutofboundsexception or Indexoutofboundsexception
Correct Way to Add External Jars (Lib/*.Jar) to an Intellij Idea Project
How to Access the Java Method in a C++ Application
How to Discover Memory Usage of My Application in Android
After Google Play Service Update to Version 13 I Got an Error
Android: Internet Connectivity Change Listener
How to Create an Executable Jar With Dependencies Using Maven