Reputation: 43
Hi I'm working on an android gps tutorial and I'm getting an error in AndroidManifest.xml. The error is "error parsing xml: junk after document element" and its showing at the manifest start tag line. Any ideas what the problem is?? I tried deleting "xmlns......android" but that doesnt work..
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</View>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ballincoliig.gun.powder.mills.walking.trail"
android:versionCode="1"
android:versionName="1.0">
<application android:versionName="@drawable/icon" android:label="@string/app_name">
<activity android:name="GPSActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
</application>
<uses-sdk android:minSdkVersion="4"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
Upvotes: 0
Views: 125
Reputation: 4351
You have to remove that <View>
element, just after the first line.
Explanation:
A <View>
element belongs in a layout, not in the manifest.
Also, XML files can only have ONE top level (root) node, in this case <manifest>
Upvotes: 2
Reputation: 72533
What's that View for? remove it:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ballincoliig.gun.powder.mills.walking.trail"
android:versionCode="1"
android:versionName="1.0" >
<application
android:label="@string/app_name"
android:versionName="@drawable/icon" >
<activity
android:name="GPSActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
</application>
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Upvotes: 3