2011-01-23 148 views
2
<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="org.example.sudoku" 
     android:versionCode="1" 
     android:versionName="1.0"> 
    <application android:icon="@drawable/icon" android:label="@string/app_name"> 
     <activity android:name=".Sudoku" 
        android:label="@string/app_name"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    //error here->//  <activity android:name=".about" 
     android:label="@string/about_title"> 


</activity> 

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

</manifest> 

//问题是,当我开发数独游戏时,我在定义活动(.about)时出错。 上面我写了代码和发生错误的地方。请帮忙//AndroidManifest.xml文件错误!

+2

你能贴一些您的清单吗?告诉我们你得到的错误是什么? (如果你使用的是eclips:将鼠标悬停在错误/红线上并等待一会儿......) – Nanne 2011-01-23 09:52:48

回答

3

我看不出什么奇怪的。难道说你在哪里试图为".About"而不是".about

0

试试这个代码:

<activity 
    android:label="@string/about_title" 
    android:name=".About" 
    android:theme="@android:style/Theme.Dialog" 
    /> 
2

有些事情要检查:

  • About开始用大写字母作为Nanne说:
  • About应在包org.example.sudoku
  • About应该延伸Activity

还要注意,而不是这样做:

<activity android:name=".About" 
     android:label="@string/about_title"> 
</activity> 

你可以这样做:

<activity android:name=".About" 
     android:label="@string/about_title"/> 
相关问题