-1

I'm new to android studio and doing my first project. I made changes to my layout xml file after which getting the above mentioned error. i didn't add any new activity and also the android manifest.xml file has default activity mentioned.

I have tried to invalidate the cache and restart the Android studio but still the error exists and I'm not able to execute my program.

Usman Ali
  • 425
  • 1
  • 9
  • 31

2 Answers2

1

You can configure it from "app" -> "Configurations" enter image description here

shizhen
  • 12,251
  • 9
  • 52
  • 88
0

In this scenario You have missed by telling the manifest about Which activity to run, Like I have Removed these Lines From Menifest

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

This error will accour, Just add the above Lines in menifest and Your error will Gone.

Like I have tested By removing the above line for Yourself from Menifest I face the Error just Like You.. Error Image

Here the main Activity will be the One You want to start First After Installation Of Apk

Usman Ali
  • 425
  • 1
  • 9
  • 31