Android : No Launcher activity found! Error


[2014-12-08 17:12:27 - androidApp] No Launcher activity found!
[2014-12-08 17:12:27 - androidApp] The launch will only sync the application package on the device!

If you are getting the above error message in eclipse logs when you run your Application, then its because you have not set a launcher Activity in the apps AndroidManifest.xml file.

You need to define an <intent-filter> for the Activity tag that is the main/launcher class i.e. the Activity that has to be loaded when the app launches.

<intent-filter> has two sub tags <action> and <category>

How to resolve this issue

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

<activity
      android:name=".MainActivity"
      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>

⛏️ Just add the <intent-filter> tag within the Activity tag that is your Launcher activity.

Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.