简体   繁体   English

android清单文件有问题

[英]Having issues with android manifest files

I have the following AndroidManifest file... 我有以下AndroidManifest文件...

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.obviam.droidz"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/images"
        android:label="@string/app_name" android:debuggable="true">
        <activity android:name=".HomeView" 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=".DroidzActivity">
        </activity>
        <activity android:name=".GameOver">
        </activity>

    </application>

</manifest>

I am getting the following compilation error, which I can't seem to figure out... 我收到以下编译错误,我似乎无法弄清楚...

    [2012-04-17 08:39:23 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /home/joshua/workspace/Droidz/AndroidManifest.xml: Element type "activity" must be followed by either attribute specifications, ">" or "/>".

Could anyone please suggest the cause of the error. 任何人都可以提出错误原因。

Still unsure as to what happened, but it appears the formatting was not the problem. 仍然不确定发生了什么,但是看来格式化不是问题。 After restarting eclipse, the issues went away. 重新启动Eclipse之后,问题就消失了。 Sorry to have bothered you all, thank you for your help though. 抱歉打扰了大家,不过谢谢您的帮助。

您的清单文件应以

</manifest>

When something like this problem happens in Eclipse, it can help to refresh and rebuild the project. 在Eclipse中发生类似问题时,它可以帮助刷新和重建项目。 Eclipse from version 3.7 can handle auto-refresh https://stackoverflow.com/a/6049245 . 3.7版以上的Eclipse可以处理自动刷新https://stackoverflow.com/a/6049245

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM