0

I am having trouble understanding how to apply a Default Activity to my Android Studio project in order for it to run without showing the 'Default Activity not found' error message in the run screen.

I have tried editing the build.gradle file to include a series of lines that some other Stack Overflow questions said to include. Here is the line that they said to include verbatim, I do not understand what is supposed to be replaced with.

sourceSets {
        main.java.srcDirs += 'src/main/<YOUR DIRECTORY>'
}

I have tried using the paths 'src/main', 'src/main/java', 'src/main/com/todo/project', 'src/main/java/com/todo/project' as well as some various other lines.

My project package path is 'com.todo.project'.

If anyone has any suggestions or solutions to my problem, please let me know. I will continue to update this question with any findings that might help you come to an answer. Thank you in advance for your help and consideration.

BigBerger
  • 1,765
  • 4
  • 23
  • 43
  • Did you look at the answer to http://stackoverflow.com/questions/18828654/default-activity-not-found-in-android-studio that recommended adding the intent filter to your manifest? The answers you're seeing that suggest messing with the build scripts may be red herrings for you. – Scott Barta Feb 20 '15 at 16:53

1 Answers1

1

Run/Debug Configuration In module app (or your named module): From left panel. Do these steps:

Activity -> Launch -> Browse -> Search you name of your start up activity. Or chose tab project -> Point to main -> java -> -> start up activity => It's work for me! It's weird cause i create new project with default template and happened this issue !

Dinh Le
  • 26
  • 2