2011-01-23 145 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"/> 
相關問題