Amrmsmb
Amrmsmb

Reputation: 1

no launcher activity found error

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?

Upvotes: 1

Views: 1963

Answers (4)

Ankitkumar Makwana
Ankitkumar Makwana

Reputation: 3485

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>

Upvotes: 0

Helal Khan
Helal Khan

Reputation: 897

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>

Upvotes: 1

rajeshwaran
rajeshwaran

Reputation: 1500

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>

Upvotes: 0

nhaarman
nhaarman

Reputation: 100378

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>

Upvotes: 3

Related Questions