2013-03-08 101 views
0

我正在學習Android,無法讓我的程序顯示在我的Nexus S仿真設備的程序清單抽屜中。當我加載模擬器時,它會在點擊「運行新配置」後成功加載我的程序。我知道有一噸這個線程...但我可以告訴我在我的清單與正確的一切:Android應用程序在模擬器中運行,但未列入啓動器

<intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 

另外,要明確在Eclipse運行配置並運行我的程序成功。它只是沒有在應用程序菜單/仿真設備的抽屜裏點擊並運行:

[2013-03-07 20:14:04 - TodDoList] New emulator found: emulator-5554 
[2013-03-07 20:14:04 - TodDoList] Waiting for HOME ('android.process.acore') to be launched... 
[2013-03-07 20:14:46 - TodDoList] HOME is up on device 'emulator-5554' 
[2013-03-07 20:14:46 - TodDoList] Uploading TodDoList.apk onto device 'emulator-5554' 
[2013-03-07 20:14:47 - TodDoList] Installing TodDoList.apk... 
[2013-03-07 20:15:23 - TodDoList] Success! 
[2013-03-07 20:15:23 - TodDoList] Starting activity com.paad.toddolist.ToDoListActivity on device emulator-5554 
[2013-03-07 20:15:24 - TodDoList] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.paad.toddolist/.ToDoListActivity } 

這裏是我的清單:

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

    <uses-sdk 
     android:minSdkVersion="4" 
     android:targetSdkVersion="15" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name="com.paad.toddolist.ToDoListActivity" 
      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> 

這裏是我的strings.xml文件:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <string name="app_name">TodDoList</string> 
    <string name="addItemHint">New To Do List</string> 
    <string name="addItemContentDescription">New To Do Item</string> 

</resources> 
+0

什麼是'@字符串/ app_name' ... – 2013-03-08 04:56:28

+0

<字符串名稱=「APP_NAME」>的值TodDoList – dman 2013-03-08 05:41:27

+0

什麼是你的類名,我認爲問題出在你的類名。這在manifestfile中是不正確的 – Rohit 2013-03-08 07:17:06

回答

1

嘗試更換

android:name="com.paad.toddolist.ToDoListActivity" 

android:name=".ToDoListActivity" 
相關問題