1

I created very simple activity that displays hello world and a button labled TEST, when i press this button the Toast will display a message and I run this app on the emulator.

the problem is that, when I try to run this app the console displays that

no launcher activity found

and nothing to be displayed on the emulator although the code has no error at all.

manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.qr00"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".QR00"
        android:label="@string/title_activity_qr00" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="QR00" />
    </activity>
</application>

Can anyone tell me how to solve the "no launcher activity found" error?

Amrmsmb
  • 1
  • 27
  • 104
  • 226

4 Answers4

3

You need to add

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

So:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.qr00"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".QR00"
        android:label="@string/title_activity_qr00" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="QR00" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
nhaarman
  • 98,571
  • 55
  • 246
  • 278
1

You need to add this Intent in your Menifest file

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
    android:name=".QR00"
    android:label="@string/title_activity_qr00" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value="QR00" />
</activity>

Helal Khan
  • 867
  • 3
  • 10
  • 25
0

you can add this code in your manifest file in activity tag.

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".QR00"
        android:label="@string/title_activity_qr00" >
<intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="QR00" />
    </activity>
</application>
rajeshwaran
  • 1,512
  • 1
  • 18
  • 24
0

add like this

      <activity
            android:name=".YourclassName"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
Ankitkumar Makwana
  • 3,475
  • 3
  • 19
  • 45