I just upgraded to Android Studio 0.2.8 and I am getting an error that says \"Default Activity not found\" when I try to edit the run configurations.
When I launch A
this happened to me because I capitalized the paths in the manifest. changed:
<intent-filter>
<action android:name="ANDROID.INTENT.ACTION.MAIN"/>
<category android:name="ANDROID.INTENT.CATEGORY.LAUNCHER"/>
</intent-filter>
to
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
and it was fixed
In Android Studio
Go to edit Configuration .
Select the app.
choose the lunch Activity path.
apply, OK.
Thanks!!
I had the same problem while importing a project into Android Studio, probably caused by the fact that the project has been developed on an earlier version of Android Studio than currently installed on my computer.
What solved it was simply choosing:
File -> Invalidate Caches / Restart...
and then selecting Invalidate and Restart
.
I ran into the same issue today and was going through the answers here.
For me the difference was that yesterday it worked fine, so I figured it could not really be a configuration issue, neither configuration nor Version of Android Studio changed.
Fortunately, I tried a restart of Android Studio before trying any of the other answers, and luckily that solved the issue.
So for all people out there who run into this: first thing to try is to restart Android Studio and only if that does not solve the issue try the other answers here.
In some case you can have model with some category
field, if you will refactor it in all places, it may refactor it in manifest file and then and the tag xml will became invalid.
Many possibilities can be happened for this kind of case (Default Activity not Found) If all code are fine, especially on Manifest, just just need to Invalidate Cache and restart the studio,
But sometime it is happened when you have duplicate activity declaration on manifest, not only for the Main activity, it is also triggered by child activities as well.
That happened with me, Default activity not found because i have duplication child activities on manifest, after deleted that, everything is well