Console warning " no activity specified getting the launcher activity "

here is my manifest file of my sample application .when ever I run my project , I got warning in console "**no activity specified getting the launcher activity**" . I follow all the steps of solution regarding this but still the problem occur .

however this doesn't appear to effect the app at all, it still starts up fine and closes fine after use etc, it does however pull focus to the console which is annoying for debugging. Manifest file :

<activity android:name="MainActivity" >
        </activity>
        <activity android:name="Pick_Date_Time" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

in this file I set the

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

As per many solution suggest.

Still have problem.

thanks in advance.

Answers


The problem is in this line:

You need to give the relative or full path of you activity in the name like:

//added dot to give relative name

<activity android:name=".MainActivity" >

or

//Full path

<activity android:name="com.android.MainActivity" >

Try this,

Replace your mainfest file with this and replace YourPackageName with your package name.

 <application
    android:icon="@drawable/ic_launcher" >
      <activity android:name="YourPackageName.Pick_Date_Time" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="YourPackageName.AnotherActivity" >
    </activity>
</application>

See this sample code and make changes in your manifest file.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your_package_name"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <uses-permission android:name="android.permission.INTERNET">
    </uses-permission>
    //Add more permissions according to your requirement

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:debuggable="false">
        <activity
            android:name="your_package_name.Name_of_Activity1"
            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=".Name_of_Activity2">
        </activity>
         </activity>

        <activity android:name=".Name_of_Activity3">
        </activity>    

        </activity>

        <activity android:name=".Name_of_Activity4">
        </activity>

        </activity>
        <activity android:name=".Name_of_Activity5">
        </activity>

         </activity>
        <activity android:name=".Name_of_Activity6">
        </activity>

    </application>

</manifest>

Need Your Help

List from aggregated duplicate objects where a string property concats the strings from the duplicate objects in C#

c# linq

There are a lot of similar questions and answers but I didn't find any which matches the criteria I'm searching for.

How can I set an NSDate object to midnight?

ios datetime swift nsdate nscalendar

I have an NSDate object and I want to set it to an arbitrary time (say, midnight) so that I can use the timeIntervalSince1970 function to retrieve data consistently without worrying about the time ...