I am going to use maps in my android application and I should use google play services. I read lots of q\\a here like this. In the mentioned question, the accepted answers s
I was also facing the same problem. After adding these two lines in my manifest file It worked .
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBAjfcxZvbt_COHjy7igHZnLBfsO1cfoM8" />
I downloaded google play services r10 and used it in my app
The above statement is the root cause of your problems. If you really used r10 (or even r12), than after removing
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
from your AndroidManifest, you would not get this error:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
This error simply says, you are linked to 4.0.30 version of the Google Play services library.
So the solution is to remove the above meta-data
and making sure you link to one of the previous versions.
If using gradle or maven, just set your dependency version to 3.2.65. If developing the old way, download Google Play services for Froyo in Android SDK Manager, copy that from sdk/extras/google/
into your working directory and in your project preferences choose this project as a library dependency project.
Update your google play services to the latest from your sdk manager which is rev 13
You need to add the below to manifest file
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
https://developers.google.com/maps/documentation/android/start#add_the_google_play_services_version_to_your_apps_manifest.
It's a new requirement added from the last revision 13 update to google-play-services.