Default Activity not found in Android Studio

后端 未结 28 1139
盖世英雄少女心
盖世英雄少女心 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:47

    If you are still getting an error that says "Default Activity not found" when you try to edit the run configurations even after executing:

    Invalidate cache and Restart.

    Then try deleting the Settings/Preferences folder:

    /< USER_HOME_DIR >/.AndroidStudioPreview3.2
    

    or on Mac :

    /Users/<USER_NAME>/Library/Preferences/.AndroidStudioPreview3.2
    
    0 讨论(0)
  • 2020-11-29 03:47

    There are two steps you can take:

    1. Go to configurations and enter the name of activity to be launched
    2. If it is still not working Disable Instant Run
    0 讨论(0)
  • 2020-11-29 03:47

    I have tried all solutions, but not working at all. than I have tried to disable Instant run in my android studio.

    Go to Android Studio Settings or Preferences (for MAC) -> Build,Execution,Deployment -> Instant Run.

    uncheck the Instant run functionality and than after click sync project with gradle files from file menu

    now run your build...

    0 讨论(0)
  • 2020-11-29 03:48
    1. Right click on the project and choose Open Module Settings.
    2. Go to the Sources tab in your module.
    3. Find your src folder.
    4. Right click on it and mark it as Sources.

    This solved the error in my case.

    0 讨论(0)
  • 2020-11-29 03:49

    For those like me who were struggling to find the "Sources tab":

    Here you have to mark your "src" folder in blue (first click in Mark as: Source, then in your src folder), and you're good to go.

    0 讨论(0)
  • 2020-11-29 03:50

    Following did the trick for me. From Run -> Edit Configuration.

    0 讨论(0)
提交回复
热议问题