I have a problem when I try to use Google Play Services in my application. I followed this tutorial https://developers.google.com/maps/documentation/android/start , but I have an error after I put this line in my AndroidManifest.xml:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
The error in the name string android: name is: "The top-level element is not complete, the Valid XML document must have a root tag." But my XML file is valid without a metadata line.
My AndroidManifest.xml starts as follows:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.objectifmultimedia.chasseursbn"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".TutorielActivity" android:label="@string/title_activity_tutoriel" > </activity> <activity android:name=".Departements.DepartementActivity" android:label="@string/title_activity_departement" > </activity> <activity android:name=".Departements.DepartementActualitesActivity" android:label="@string/title_activity_departement_actualites" > </activity> <activity android:name=".Departements.DepartementPermisDeChasserActivity" android:label="@string/title_activity_departement_permis_de_chasser" > </activity> <activity android:name=".Departements.DepartementDatesOuverturesActivity" android:label="@string/title_activity_departement_dates_ouvertures" > </activity> <activity android:name=".Departements.DepartementEspacePersonnelActivity" android:label="@string/title_activity_departement_espace_personnel" > </activity> <activity android:name=".Departements.DepartementAnnuairesActivity" android:label="@string/title_activity_departement_annuaires" > </activity> <activity android:name=".Departements.DepartementMeteoEphemerideActivity" android:label="@string/title_activity_departement_meteo_ephemeride" > </activity> <activity android:name=".Departements.DepartementCommunesLimitrophesActivity" android:label="@string/title_activity_departement_communes_limitrophes" > </activity> <activity android:name=".Aide.AideActivity" android:label="@string/title_activity_aide" > </activity> <activity android:name=".PendantMaChasse.PendantMaChasseActivity" android:label="@string/title_activity_pendant_ma_chasse" > </activity> <activity android:name=".Departements.DepartementActualitesDetailActivity" android:label="@string/title_activity_departement_actualites_detail" > </activity> <activity android:name=".Departements.DepartementDatesOuverturesDetailActivity" android:label="@string/title_activity_departement_dates_ouvertures_detail" > </activity> <activity android:name=".PendantMaChasse.PendantMaChasseMapActivity" android:label="@string/title_activity_pendant_ma_chasse_map" android:theme="@android:style/Theme.NoTitleBar"> </activity> <activity android:name=".PendantMaChasse.PendantMaChasseDatesActivity" android:label="@string/title_activity_pendant_ma_chasse_dates" > </activity> </application> </manifest>
Thanks. Yann
source share