Reputation: 81
While running my android app it shows the above error. I tried to change AVD manager "Use Host GPU" but could not found that. Android emulator opened but still it showing black screen and Not even show that android words. I am using Mac OS.
Upvotes: 8
Views: 47397
Reputation: 1
I had the same problem, setting the MainActivity.kt
as default was not my issue, but SDK version was creating the problem. So just check that and sync gradle on app level.
Upvotes: -1
Reputation: 11
Upvotes: 1
Reputation: 203
Thank you for this update. In my case, the package name was not the correct one. I had copied a MainActivity from another app and not changed the package name.
Upvotes: 0
Reputation: 1060
First of all, check the window "Edit Configuration" that opens when you click in "Run" or "Debug" button.
Then, check the bottom section "Before launch: Gradle-aware Make". Click on that small triangle to hide it. An error message should appear. This message should give you a clue about your problem.
In my case this message says: "Error: Default Activity not found", that's because I was changed my
<category android:name="android.intent.category.LAUNCHER" />
for
<category android:name="android.intent.category.DEFAULT" />
Hope this help you or somebody. Sorry for the english. ;)
Upvotes: 10