1

i am trying to change my launcher activity .i tried this.wanted to have Welcome as my launcher activity instead of Main

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.ashik.project">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".Welcome">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

but it'showig the following message:

4:13:43 PM Error running app: Default Activity not found

4:13:48 PM Error running app: Default Activity not found

4:13:49 PM Error running app: Default Activity not found

ashik
  • 99
  • 1
  • 7

1 Answers1

1

if your Activity class not directly inside the src folder means you have to mention package name in manifest file .i think you missed package name of welcome class

activity structure like this format

   android:name=".packagename.package2..upto..packageN.className"

so change

 <activity
      android:name=".packagename.Welcome">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
sasikumar
  • 12,540
  • 3
  • 28
  • 48