开发者

Android Manifest Error

So in my project I'm getting a Android Manifest Error

(Errors on the <activity android:name=".SettingsEditActivity" line)

In the console it says "com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Documents and Settings\XXX\workspace\XXXX\AndroidManifest.xml: Attribute name "android:name" associated with an element type "activity" must be followed by the ' = ' character.

Here's manifest xml

<?xml version="1.0" encoding="utf-8"?>

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <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=".SettingsEditActivity"  
      android:label="@string/app_name"/>  
<activity android:name=".ChooserActivity"  
      android:label="@string/app_name"/>  
<activity android:name=".UploadActivity"  
      android:label="@string/app_name"/>  
<activity android:name=".GameActivity"  
      android:label="@string/app_name"/>  
<activity android:name=".HighScoresActivity"  
      android:label="@string/app_n开发者_JAVA百科ame"/>  
</application>


Something is wrong here. You have a closing activity tag before all other activities and the closing tag hasn't a corresponding opening tag.

Here you can see how a manifest should look right:

http://developer.android.com/guide/topics/manifest/manifest-intro.html

So in your case something like this:

<manifest>
  <application android:icon="@drawable/icon" android:label="@string/app_name">
    <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=".SettingsEditActivity"  
          android:label="@string/app_name"/>  
    <activity android:name=".ChooserActivity"  
          android:label="@string/app_name"/>  
    <activity android:name=".UploadActivity"  
          android:label="@string/app_name"/>  
    <activity android:name=".GameActivity"  
          android:label="@string/app_name"/>  
    <activity android:name=".HighScoresActivity"  
          android:label="@string/app_name"/>  




</application>
</manifest>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜