Adding Google Play Services Version to Your App's Manifest

Adding Google Play services version to your app's manifest?

It is probably that your library is not linked to project properly or that you have older google-play-services library version so conflict appears and Eclipse got stupid.. :S

No you don't need to add anything in integers.xml. When you link properly Google-play-services library to your project reference android:value="@integer/google_play_services_version" will be found and you are ready to go. When you add library to your project just do one more clean so funny Eclipse environment sweep-out things properly.

If you hardcode somewhere this number when next play version come you would need to update it. And if you forget that, you will spend time again looking for bug.. :S

Hope it helped. ;)

Requirement to mention Google Play services version in app's manifest

Google continuously upgrading it's play service.But as old applications are there, so to support applications which are using old version of play service we need to spacify on what version of play service our application based.

Update:

we include google-play-service lib and the version is based on this lib not on google play service installed in our mobile. so play-service-lib jar will always be inside in our application with it's version code.So google will manage google play service request according to play-service-lib version.

we provide version of google-play-service lib in our manifest

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

and "@integer/google_play_services_version" refers to version of Lib,which is using in our application.

This is just like, We request Facebook installed application or we use Facebook Sdk with our application..Both are different things.

Hope it is clear..

Why is my Google Play Services version incorrect?

Well, I found the answer. I'm embarrassed and not proud, but figure I should still share for the community! While I have experience with the upper levels of Android (through Xamarin), I do not have experience with somewhat obscure things like the Resource folder and the AndroidManifest.xml. In any case, I should've known that the declared value in my AndroidManifest.xml, @integer/google-play-services-version, implied that the value was declared somewhere within my project. Sure enough, I found that it was declared in an obscurely-located values.xml file.

It was indeed hard-coded in as 8487000, and when I switched it to 11400000, everything worked as intended. Make sure you check your entire project before making a StackOverflow post is the lesson here!

Adding Google Play Services to an android app results in 'com.android.support and androidx.* conflict'

Your error is pretty self explanatory. It says:

Dependencies using groupId com.android.support and androidx.* can not be combined

that means, you're mixing up support and androidx dependencies.

To be more clear, you're using support libraries pretty much everywhere, i.e anything containing com.android.support in your app/build.gradle, but, the latest library for ads uses Androidx dependencies.

You can fix the error by converting your app dependencies to androidx, as the latest play-services-ads library uses Androidx dependencies, or, alternatively, you can use the older version of play-services-ads which used support dependencies (not recommended as support libraries are no longer maintained).

You can find how to migrate to androidx here.

Regarding your another error regarding Manifest merger failed, you can fix it by following the instructions from the answer given here.

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.

What permissions are needed by each Google Play Services component?

Visit $ANDROID_SDK/extras/google/m2repository/com/google/gms. In there, choose your desired artifact (e.g., play-services-maps) and version (e.g., 8.1.0). Open up the AAR in your favorite ZIP utility, and look at the AndroidManifest.xml file published in there, to see if there are <uses-permission> elements. Then, open up the POM file, see what dependencies there are, and repeat the process for the AARs for those dependencies.

android studio 1.5.1 auto add google play services

by @IntelliJ Amiya hint i add google play service library and error gone.

but steel i do not know why android studio add this

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

lines automatically to my manifist.

cant resolve symbol for google play services in android manifest

Did you make sure to update the build.gradle file with

compile 'com.google.android.gms:play-services:5.+'

and to rebuild/clean the project?

Make sure you're not working offline and you have a good Internet connection (the gradle needs to be able to access the Internet)



Related Topics



Leave a reply



Submit