“未找到启动器活动!"是什么意思? [英] What does it mean "No Launcher activity found!"

查看:36
本文介绍了“未找到启动器活动!"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个简单的Android程序,没有得到这些错误,我不知道它们是什么.我的程序是对的,但没有显示输出.我认为是因为这两行:

I am writing a simple program of Android, and getting these no errors, I don't know what they are. My program is right, but showing not output. I think it is because of these two lines:

[2005-01-06 19:56:38 - my_Android] No Launcher activity found!
[2005-01-06 19:56:38 - my_Android] The launch will only sync the application package on the device!

推荐答案

这是 AndroidManifest.xml 中的一个示例.您需要在 Intent 过滤器中为要在启动时启动的活动指定 MAIN 和 LAUNCHER

Here's an example from AndroidManifest.xml. You need to specify the MAIN and LAUNCHER in the intent filter for the activity you want to start on launch

<application android:label="@string/app_name" android:icon="@drawable/icon">
    <activity android:name="ExampleActivity"
              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>

这篇关于“未找到启动器活动!"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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