I have created a new project in android studio and when i am trying to run it ,it is saying default activity not found.i have checked my manifest file this does not contain any problem. there is a Red X Mark android studio application while running
-
What is your android studio version?? – Piyush Nov 30 '18 at 11:59
-
paste stacktrace and manifest – Vishal Thakkar Nov 30 '18 at 12:02
-
android studio 3.2.1 – priya kushwah Nov 30 '18 at 12:09
-
go to your Edit Configuration and take a screenshot of that, maybe there's something off about your Launch Options. – TWL Nov 30 '18 at 22:02
-
Show the code what you have tried so far? – ॐ Rakesh Kumar Dec 02 '18 at 12:51
-
I would try to rebuild the Projekt. Please coment the output of the Logcat. – Apr 18 '19 at 12:10
7 Answers
Exit Android Studio.
Go to path > C:\Users\YOUR_WINDOW_USER_NAME\.AndroidStudio3.3\system
Remove /caches
folder.
Make sure
you have defined Launcher activity in Manifest file for one Activity
you have set the default activity from Configurations
you have set the selected activity from Configurations.

- 1
- 1

- 289
- 2
- 4
-
works perfectly. + i removed other caches folder or temp folder too. – Abhishek Garg Apr 18 '19 at 08:39
-
1Yes; Restarting android studio by selecting "Invalidate catches and Restart" from file menu works sometimes. – pooja jardosh May 13 '19 at 07:00
-
-
-
This is the one that works for me after upgrading to ver. 4. Thank you very much! – Konayuki Aug 13 '20 at 06:26
There is a work around to make it work that worked for me.
1- Select Edit Configurations from the drop down next to run button.
2- Under launch options > Launch select Specified activity.
3- Another field "Activity" will appear select your default activity.
4- Click OK and sync project with gradle files and it should work.

- 91
- 7
-
i have follwed these steps but that does not work .i have got solution of my problem that i uninstall android studio and reinstall it now it is working fine. – priya kushwah Dec 02 '18 at 15:05
two Method for solving this problem
Method 1.make sure that default activity is define in your manifest
Method 2. even default activity is define but not solved than go to your manifest file click on merged Manifest at bottom left side of your manifest file and you will see the side drawer menu of your manifest file you will see the error and from there you can solved your error by click on suggestion.

- 119
- 5
Check the manifest file and under the activity tags make sure it has:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Activity_name Here"
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>
Make sure that the line containing the action android:name= "android.intent.action.MAIN"
is included in the activity tag of the application.
Also make sure that activity name is corresponding to the android:name of the activity.
Try to check this code..
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
Check whether your Launcher activity intent filter has this
tools:node="remove"
If yes, remove it and error will be resolved. This piece of code will be used when we are having flavors in our project structure, in-order to remove a Launcher activity.
Else, Two launcher icons will be installed.

- 2,096
- 5
- 23
- 40
i have resolved this issue by changing the location of android studio from program files to program filesx86

- 29
- 1
- 1
- 6