Change application's starting activity

前端 未结 11 2149
温柔的废话
温柔的废话 2020-11-22 16:51

I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen).

Couple questions

11条回答
  •  佛祖请我去吃肉
    2020-11-22 17:34

    In a recent project I changed the default activity in AndroidManifest.xml with:

    
    
    
    
        
            
            
        
    
    

    In Android Studio 3.6; this seems to broken. I've used this technique in example applications, but when I use it in this real-world application it falls flat. The IDE once again reports:

    Error running app: Default activity not found.

    The IDE still showed a configuration error in the "run app" space in the toolbar (yellow arrow in this screenshot)

    To correct this error I've tried several rebuilds of the project, and finally File >> "Invalidate Cache/Restart". This did not help. To run the application I had to "Edit Configurations" and point at the specific activity instead of the default activity:

提交回复
热议问题