Default Activity not found in Android Studio

后端 未结 28 1323
盖世英雄少女心
盖世英雄少女心 2020-11-29 03:22

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

28条回答
  •  温柔的废话
    2020-11-29 03:46

    When I clicked "Open Module Settings", there was no "Source" tab, I think because that's been removed for newer versions of Android Studio (I'm on 0.8.14). So I had to do this instead:

    Add these lines to the build.gradle file inside the android { ... } block:

    android { ... sourceSets { main.java.srcDirs += 'src/main/' } }

    After editing the file, click Tools > Android > Sync Project with Gradle Files.

    Credit to this answer and this comment.

提交回复
热议问题