我在放我的第一個android應用程序,並且遇到了我認爲是一個簡單的問題,但我無法在任何地方找到解決方案。當我嘗試運行仿真器中的代碼我得到:Android Manifest:第1行的語法錯誤
AndroidManifest.xml: line 1: syntax error near unexpected token `newline'
AndroidManifest.xml: line 1: `<?xml version="1.0" encoding="utf-8"?>'
這裏是我的清單的前兩行:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
清單語法看起來是完全正確的給我。如果有問題,我在OSX上使用Eclipse。我能找到的唯一相關問題是: Android: layoutopt error - syntax error near unexpected token `newline'
但是這裏沒有答案,只是說這是一個錯誤,需要報告。它仍然是一個錯誤?
編輯:這是整個AndroidManifest.xml文件。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="onemorepallet.app"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="13" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".OnemorepalletActivity"
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>
您是否嘗試清理您的項目? – Sajmon 2013-03-12 16:28:02
yessir,沒有區別 – rastafarianmenagerie 2013-03-12 16:32:10
嘗試將清單複製到文本文件中,關閉清單空白,打開它備份,粘貼回去,然後關閉它並保存,然後嘗試運行它 – JRowan 2013-03-12 17:39:55