title: Android Studio reports "Could not identify launch activity: Default Activity not found" when building Kotlin projects
body: <p>I'm trying to build an Android app using Kotlin and Anko. When I select "Run" in Android Studio I get the error:</p>
  
  <blockquote>
    <p>Could not identify launch activity: Default Activity not found<br>
    Error while Launching activity</p>
  </blockquote>
  
  <p>and the app does not start. I get this error with both the emulator and with a real phone.</p>
  
  <p>To try and narrow down the problem I tried a couple of sample Anko projects, including <a href="https://github.com/vsouhrada/android-anko-sample" rel="nofollow noreferrer">android-anko-sample</a>, and they all exhibit this same broken behavior.</p>
  
  <p>I have other Android projects I've written in Java, and they run without this problem, which suggests that this is somehow a Kotlin or Anko specific issue. I can even switch back and forth between one of my Java apps and the "android-anko-sample" app linked above, and reproduce the problem with android-anko-sample consistently, while my Java app works correctly every time.</p>
  
  <p>I have looked at other questions involving this error message, and the solutions posted were either not applicable or didn't help.</p>
  
  <p>One thing I have noticed that's weird is that when I open <code>AndroidManifest.xml</code> (of any of these Anko apps) in Android Studio the names of the activities are shown in red, as if they are errors. Here's how the one from android-anko-sample looks:</p>
  
  <p><a href="https://i.stack.imgur.com/03m0c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/03m0c.png" alt="screenshot of AndroidManifest.xml"></a></p>
  
  <p>Note that the app does get installed on the phone/emulator, and I can tap on the icon and run it. It just won't automatically start when I select run from Android Studio, which is pretty inconvenient.</p>
  
  <p>How do I fix this issue?</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Android Studio 2.1.2</li>
  <li>Ubuntu Linux 16.04</li>
  <li>Oracle JDK 1.8.0_131-b11</li>
  </ul>
  
  <p>Code is here:</p>
  
  <ul>
  <li><a href="https://github.com/vsouhrada/android-anko-sample" rel="nofollow noreferrer">https://github.com/vsouhrada/android-anko-sample</a></li>
  </ul>
  
  <p>The complete contents of a few of Android Studio's panes are available in this gist:</p>
  
  <ul>
  <li><a href="https://gist.github.com/xenomachina/e8027b385661038c3f020a543493eebf" rel="nofollow noreferrer">https://gist.github.com/xenomachina/e8027b385661038c3f020a543493eebf</a></li>
  </ul>