I am getting a No Launcher activity found! error while launching my Andoid Application. My AndroidManifest.xml file has a LAUNCHER tag defined. I am not clear why I am getting this error though.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.test.Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.test.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.test.Class1"
android:label="#string/app_name">
</activity>
<activity
android:name="com.example.test.Class2"
android:label="#string/app_name">
</activity>
</application>
Can anyone advise the cause for this error ?
Replace
<action android:name="com.example.test.MAIN" />
with
<action android:name="android.intent.action.MAIN" />
Related
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".precus"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.yair.guessit.PRECUS" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="Customize"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="FirstPage"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.yair.guessit.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
this is my manifest up there, and the app dont open .
can someone explain me how to set up the manifest with all the activites?
the precus is the first for now to open when the app open.
at the precus activity there is a intent that when the button get clicked its Customize activity.
why its not working?
change this line in your file
<action android:name="com.yair.guessit.PRECUS" />
to
<action android:name="android.intent.action.MAIN"/>
then run it.
if it work fine. then mark it as an accepted answer.
Your application has all Activities with intent-filter .Main... Let only one to have this filter, in others - just delete intent-filteres like...
<activity
android:name="FirstPage"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
So I have an app, with 2 activities. For some reason I am getting 2 launcher icons, one for each activity, but I only want one!
The Game activity had an intent-filter which i removed. I also uninstalled the app and reinstalled it from scratch but its still coming up with both launchers :(
Manifest below
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Game"
android:label="#string/title_activity_game" >
</activity>
</application>
You need to remove the label tag from your second Activity.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Game" >
</activity>
</application>
I have just started to develop a brand new application and I have two Activities set up one which displays the Splash Screen and another the Main one. Here is the manifest file:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.SPLASH" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
I tried changing android.intent.action also removing the DEFAULT Category line from Main also placing the Splash Activity setup above main.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<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>
<activity
android:name=".Splash"
android:label="#string/app_name" >
</activity>
</application>
Just realized the .MAIN in action and .LAUNCHER should be in the same activity , it's working now!
check this
Android: No Launcher activity found! was working before
How can I find out from many class file that the particular file is the activity which was created at the time of creating the project?
There is must one Activity as Launcher.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
It need to define in AndroidManifest.xml so check your AndroidManifest.xml and you could see one launcher activity..
I seen your AndroidManifest.xml which you given link in this case may be DialtactsActivity or DialtactsContactsEntryActivity launcher activity
I don't know if that is what you mean:
In your manifest:
<activity android:name=".mainActivity" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"> //THIS IS MAIN BECAUSE THERE IS INTENT_FILTER
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity1" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" />
<activity android:name=".Activity12" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" />
<activity android:name=".Activity123" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" />
<activity android:name=".MyProfileActivity" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" />
I have created an android application using eclipse, but when i run it, i get the following message
[2011-01-13 18:15:55 - BookSwap] No Launcher activity found!
[2011-01-13 18:15:55 - BookSwap] The launch will only sync the application package on the device!
however my manifest file has defined a launcher:
<application android:icon= "#drawable/icon" android:label="#string/app_name">
<activity android:name=".bookswap"
android:label="#string/app_name">
<activity android:name=".BuyActivity"
android:label="#string/app_name">
<activity android:name=".SellActivity"
android:label="#string/app_name">
<activity android:name=".FreecycleActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</activity>
</activity>
</activity>
</application>
can anyone help me please?
For some reason you're nesting your activities
<application android:icon= "#drawable/icon" android:label="#string/app_name">
<activity android:name=".bookswap"
android:label="#string/app_name">
</activity>
<activity android:name=".BuyActivity"
android:label="#string/app_name">
</activity>
<activity android:name=".SellActivity"
android:label="#string/app_name">
</activity>
<activity android:name=".FreecycleActivity"
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>