Android 根元素前面的文档中的标记必须格式正确
错误:根元素前面的文档中的标记必须格式正确。我如何纠正它 我刚刚开始使用eclipse,正在按照developer.android.com上的说明构建myfirstappAndroid 根元素前面的文档中的标记必须格式正确,android,Android,错误:根元素前面的文档中的标记必须格式正确。我如何纠正它 我刚刚开始使用eclipse,正在按照developer.android.com上的说明构建myfirstapp <<<<<<< Original <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" pack
<<<<<<< Original
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<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=".DisplayMessageActivity"
android:label="@string/title_activity_display_message"
android:parentActivityName="com.example.myFirstApp.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.myFirstApp.MainActivity" />
</activity>
</application>
</manifest>
=======
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<application>
<activity android:name="com.example.myfirstapp.DisplayMessageActivity"
android:label="@string/title_activity_display_message"
android:parentActivityName="com.example.myfirstapp.MainActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.myfirstapp.MainActivity" />
</activity>
</application>
</manifest>
>>>>>>> Added
您需要删除“已添加”。它们很可能是通过合并工具放在那里的
请确保将文件放在文件的顶部。对于其余部分,我不知道您希望原始部分中的哪些部分位于顶部,而您的新条目位于“==========”下方