0

I do find multiple solutions on here, but non of them work for me... I cloned an ixisting Androi project, it worked perfectly fine, I added and changed some code, added a fragment and a resource for the fragment. While doing this, everything kept working fine, but suddenly I got this error...

I tried several things: 1. In "Edit Configuration" changed the "Default Activity" to specific activity, but than I get the error that it is not specified in the AndroidManifest.xml (which it is). 2. I tried using the full package path in the manifest ("com.example.something.ActivityLogin" instead of ".ActivityLogin")

    <activity android:name=".ActivityLogin"
        android:launchMode="singleInstance"
        android:screenOrientation="portrait"
        android:configChanges="orientation|keyboardHidden"
        android:windowSoftInputMode="adjustResize">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

    </activity>
  1. Invalidated caches and restarted
  2. Tried reinstalling Androi Studio

And now for the craziest one: 5. Removed the entire project, pulled the master from git, and the issue is still present!

Also, I did not touch the AndroidManifest nor the ActivityLogin at all, I did not refactor anything...

I'm not sure where to look further, I'm guessing it is an Android Studio (3.2.1 from October 9, 2018) related issue? Also, another project keeps running just fine...

SparkyRih
  • 49
  • 9
  • 1
    Possible duplicate of [Error: Default Activity Not Found](https://stackoverflow.com/questions/15825081/error-default-activity-not-found) – Martin Zeitler Dec 15 '18 at 21:11

2 Answers2

1
<intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

Build-Clean Project or Build-Rebuild Project

0

Well, I knew it wasn't my code, it was Android Studio... This did the trick: https://stackoverflow.com/a/52680053/5427848

SparkyRih
  • 49
  • 9