No Launcher Activity found with .Launcher in Manifest.xml already included?

拈花ヽ惹草 提交于 2019-12-13 00:04:24

问题


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

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.

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


回答1:


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.



来源:https://stackoverflow.com/questions/6181126/no-launcher-activity-found-with-launcher-in-manifest-xml-already-included

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!