Search code examples
androideclipse-juno

could not delete activity_main.xml and parser exception in AndroidManifest.xml.The markup preceding the root element must be well-formed


then shown :

  1. Could not delete /menu/activity_main.xml.
  2. parser exception for AndroidManifest.xml : content is not allowed in trailing section.
  3. parser exception for AndroidManifest.xml :The markup in the document preceding the root element must be well-formed.

my Xmls files are

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.school.feedback.app"
    android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15"/>
     <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="MainActivity"/>      
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>        
        <activity
            android:name=".StudentActivity"
            android:label="@string/title_activity_student">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.example.school.feedback.app.MainActivity"/>
        </activity>     
   </application>
</manifest>

and activity_main.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/menu_settings"
        android:title="@string/menu_settings"
        android:orderInCategory="100"
        android:showAsAction="never" />
</menu>

Solution

  • Try clean your project.(In eclipse : Project->Clean)