我在放我的第一个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