Android 即使代码正常,也找不到启动程序活动(尽管我不确定)

Android 即使代码正常,也找不到启动程序活动(尽管我不确定),android,eclipse,error-handling,app-launcher,Android,Eclipse,Error Handling,App Launcher,我现在正试图用Eclipse和推荐的ADK开发一个简单的Android应用程序。我确信开发工具是非常更新的。然而,当我试图编写一个简单的Hello World应用程序并在创建的仿真器中运行它时,我永远无法摆脱找不到启动程序的活动。我已经检查了Android清单,我确信已经创建了Launcher活动。代码如下: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.h

我现在正试图用Eclipse和推荐的ADK开发一个简单的Android应用程序。我确信开发工具是非常更新的。然而,当我试图编写一个简单的Hello World应用程序并在创建的仿真器中运行它时,我永远无法摆脱找不到启动程序的活动。我已经检查了Android清单,我确信已经创建了Launcher活动。代码如下:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >

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

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
        <activity
        android:name="com.example.helloworld.Activity_1"
        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>
我知道可能会有很多这样的问题。我遵循了许多答案和教程,但仍然无法摆脱这个错误。有人能帮我吗


改进的新代码:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloworld"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
            <activity
            android:name="com.example.helloworld.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="com.example.helloworld.DisplayMessageActivity"
            android:label="@string/title_activity_display_message"
            android:parentActivityName="com.example.helloworld.MainActivity" >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.myfirstapp.MainActivity" />
    </activity>
    </application>

</manifest>

嗯,logcat是正确的,
没有用于
的启动器。将活动标记移动到清单文件中的应用程序标记内

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.helloworld"
  android:versionCode="1"
  android:versionName="1.0" >



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

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


发布您的应用程序清单。查看示例应用程序,您将在清单中找到一个
活动
标记。这就是您的案例中缺少的内容。@RichardLeMesurier活动标记已添加,但问题仍然存在there@hichris123什么是应用程序清单?这是Android清单,我不确定它是否是您想要的。请尝试以下步骤:1)尝试清理和构建,2)从模板创建一个空白HelloWorld应用程序,并确保其正常工作,3)将代码从损坏的项目复制到新的工作项目中。谢谢@Pr38y,但我仍然无法用您的建议解决问题…:(
[2014-07-16 19:34:00 - HelloWorld] Android Launch!
[2014-07-16 19:34:00 - HelloWorld] adb is running normally.
[2014-07-16 19:34:00 - HelloWorld] No Launcher activity found!
[2014-07-16 19:34:00 - HelloWorld] The launch will only sync the application package on the device!
[2014-07-16 19:34:00 - HelloWorld] Performing sync
[2014-07-16 19:34:01 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD 'AVD'
[2014-07-16 19:34:01 - HelloWorld] Launching a new emulator with Virtual Device 'AVD'
[2014-07-16 19:34:21 - Emulator] emulator: device fd:612
[2014-07-16 19:34:21 - Emulator] 
[2014-07-16 19:34:21 - Emulator] HAX is working and emulator runs in fast virt mode
[2014-07-16 19:34:23 - Emulator] emulator: warning: opening audio input failed
[2014-07-16 19:34:23 - Emulator] 
[2014-07-16 19:34:26 - HelloWorld] New emulator found: emulator-5554
[2014-07-16 19:34:26 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...
[2014-07-16 19:36:08 - HelloWorld] emulator-5554 disconnected! Cancelling 'sync'!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.helloworld"
  android:versionCode="1"
  android:versionName="1.0" >



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

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