I am new in Android. I followed the step in Android Developer to build my first application using Eclipse. But after creating the project, an error occur in the first line of AndroidManifest.xml. The console complain, AndroidManifest.xml:1: error: Error parsing XML: not well-formed (invalid token)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg"
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>
</application>
</manifest>
I searched Google and found some method. 1. Select all the code and CTRL + i. 2. Right click AndroidManifest.xml -> Source -> Format. 3. ... But all of them don't work in my case.
I have confirmed that there are no space or tab before <?xml version="1.0" encoding="utf-8"?>. Does anyone have the same problem? Thanks for help.
No comments:
Post a Comment