2

my problem is related to Android Studio.Whenever I try to run my app I get an error that says default activity not found.Please help me out,it's really important.Thank you in advance! Just in case,I've got 2 classes: the first one is MainActivity,the second one is CatRepository

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cats">
<uses-permission android:name="android.permission.INTERNET"/>
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".ui.MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

</manifest>
Michael
  • 41
  • 3

3 Answers3

1

Try to replace <activity android:name=".ui.MainActivity"> by <activity android:name=".MainActivity">

Raida
  • 1,206
  • 5
  • 17
0

Try putting full package name of your Activity.

0

You can try invalidating cache and restart. File -> Invalidate Cache/Restart

Also after doing this, sync your project. : File-> Sync Project with Gradle Files

Akshay Shenoy
  • 1,194
  • 8
  • 10