Adroidist
Adroidist

Reputation: 554

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

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.

Upvotes: 2

Views: 13211

Answers (2)

devio
devio

Reputation: 654

please make sur to add android:exported="true" it will be like that

<activity android:name=".MainActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Upvotes: 0

FrEaKmAn
FrEaKmAn

Reputation: 1845

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.

Upvotes: 12

Related Questions