“Default Activity Not Found” on Android Studio upgrade

后端 未结 30 2623
时光说笑
时光说笑 2020-11-22 05:08

I upgraded IntelliJ Idea from 12.0.4 to 12.10.

Now all the modules in my Android project give the error:

Error: Default Activity Not Found

30条回答
  •  感动是毒
    2020-11-22 05:58

    I can't comment on why the upgrade of IntelliJ might cause this problem because I don't use it.

    However, that error: "Default Activity Not Found" seems to be telling you that you don't have an activity declared in AndroidManifest.xml that is marked as the main activity, to be launched when the application starts.

    You should have at least one activity that looks something like this:

    
            
                
    
                
            
    
    

    If you don't have at least one activity with an intent filter like that, you would most likely see the error message you have included here.

    You should add that intent filter to the Activity that you wish to open when you start the application, and that should fix your problem.

提交回复
热议问题