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.



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap