在没有用的Manifest.xml发现.Launcher启动活动已列入? [英] No Launcher Activity found with .Launcher in Manifest.xml already included?

查看:87
本文介绍了在没有用的Manifest.xml发现.Launcher启动活动已列入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行源$ C ​​$ C,我在网上找到的机器人。当我运行它,它给了我:

I am trying to run a source code I've found online for android. When I run it, it gives me:

没有启动的活动找到了!结果
  这次发射将只同步应用程序包设备上!结果
  执行同步

No Launcher activity found!
The launch will only sync the application package on the device!
Performing sync

我已经在我的Manifest.xml以下内容:

I already have in my Manifest.xml the following:

action android:name="android.intent.action.MAIN" 
category android:name="android.intent.category.LAUNCHER" 

可能是什么问题?奇怪的是,它的工作一次。然后,当我再次遇到它,它给了我需要强制应用程序。

What could be wrong? The weird thing is that it worked once. And then when I ran it again it gave me needs to force the application.

这不是一个重复的问题,因为我读过,每个人都在暗示放置那些在manifest.xml。

It is not a duplicate question because I've read that everyone is suggesting to place those in the Manifest.xml.

推荐答案

我认为你需要定义一个启动活动。例如,在我的应用程序

I think you need to define a launching activity. For example in my app

    <activity android:name=".Main"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>   

我已经定义了活动开始应用的开始。

I have defined which activity is started on app start.

这篇关于在没有用的Manifest.xml发现.Launcher启动活动已列入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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