-1

I have a problem that I have seen that a lot of other users have.
When I try to run my application I get an error that says that I have no default activity.
The weird thing is that in the first one everything works fine but on the second one it starts doing problems.
I've tried to do
"File -> Invalidate Caches / Restart..."
but it works for only one run (sometimes doesn't work at all).
Also when I run the same code on another computer it works perfectly every time.
I tried reinstalling android studio but that did not help.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Netanel
  • 477
  • 2
  • 11

1 Answers1

0

Ensure you have at least one activity being the launcher in your manifest

<activity
    android:name="com.your.package.name.YourActivity"
    android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

if that does not work,go to files> Sync Project with gradle files

simon
  • 126
  • 8