loading

Office 01

JL. RAYA SAWANGA, MAMPANG
Pancoran Mas, Depok
+628111026606
Mon - Fri 9:00am - 5:00 pm
[email protected]
24 X 7 online support

How to fix Default Activity Not Found in Android Studio

How to fix Default Activity Not Found in Android Studio
How to fix Default Activity Not Found in Android Studio
How to fix Default Activity Not Found in Android Studio

This error will cause when your app lose define of your main activity, mostly is because you removed part of your main activity code from AndroidManifest.xml file.

Here is a sample of how your main activity class should be defined in AndroidManifest.xml file.

<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
</application>

If you cross check your AndroidManifest.xml  with sample code above most probably you will realize that there is shorter code in  <intent-filter> section both action and category tags are required to define main activity.


Be the first to leave a comment.

Post a Comment

back to top