没有启动活动中 [英] No Launcher activity found

查看:107
本文介绍了没有启动活动中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到任何问题,但它不断给我的错误没有启动的活动找到了!和推出仅同步应用程序包的设备上! 谁能解决这个问题???

I can't find any problem but it keep giving me the error "No Launcher activity found!" and "The launch will only sync the application package on the device!" can anyone solve this problem???

这是我Maniest

    <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <activity
        android:name="com.example.saikoro.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

            <activity
        android:name="com.example.saikoro.StartUp"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="com.example.saikoro.StartUp" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

推荐答案

&LT;活性GT; 要启动通过应用程序列表上的图标的活性元素必须包含的的意图过滤器以下几部分组成两个的:

The <activity> element of the activity you want to launch through the icon on the app list must contain both of the following parts of the intent-filter:

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

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

您当前的清单与目录 LAUNCHER 和行动的活动,但在不同的活动。一个在应用程序列表中的图标必须有他们两个。

Your current manifest has an activity with category LAUNCHER and action MAIN, but in different activities. The one with the icon in the app list must have them both.

这篇关于没有启动活动中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆