2013-03-08 255 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" 
相关问题