“Default Activity Not Found” on Android Studio upgrade

后端 未结 30 2680
时光说笑
时光说笑 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 06:09

    This occurred to me after my PC restarted unexpectedly.
    Strangely, I had made no changes and still got this error.
    None of the above helped me. What solved my problem, is this.
    Step 1:


    Step 2:


    Step 3:

    If this doesn't solve the problem give other tries.

    Try 1:

    File -> Invalidate Caches / Restart...
    

    Try 2:
    check whether these following two lines

    
    
    

    are in your launcher activity declaration in manifest.xml

    
            
                
    
                
            
    
    

    Try 3:

    1. Click as shown:

    2. Run / Debug Configurations opens.





    if this also doesn't help.
    Try 4:

    1. File->Export to ZIP.
      and
    2. Import it as new project.

    Best luck.

提交回复
热议问题