title: Error running 'app': The activity must be exported or contain an intent-filter
body: <p>I'm quite new to android development and I have never been able to test a specific activity because it won't load onto the emulator. So I took advice from other questions on this platform. I went to <strong>run -&gt; edit configurations -&gt; Launch: specified activity</strong> and selected the activity from the launch options but this error keeps appearing.</p>
  <p>I have StaffMainActivity and MemberMainActivity, they are identical however the member activity doesn't have the error.</p>
  <p>AndroidManifest code:</p>
  <pre><code>&lt;application
          android:allowBackup=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;
          android:label=&quot;@string/app_name&quot;
          android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
          android:supportsRtl=&quot;true&quot;
          android:theme=&quot;@style/Theme.JimsGym&quot;&gt;
          &lt;activity android:name=&quot;.MemberLoginActivity&quot; /&gt;
          &lt;activity android:name=&quot;.LoginOptions&quot; /&gt;
          &lt;activity android:name=&quot;.MemberMainActivity&quot; /&gt;
          &lt;activity android:name=&quot;.StaffMainActivity&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  </code></pre>
  <p>StaffMainActivity code:</p>
  <pre><code>package com.example.jimsgym
  
  import androidx.appcompat.app.AppCompatActivity
  import android.os.Bundle
  import androidx.navigation.findNavController
  import androidx.navigation.ui.AppBarConfiguration
  import androidx.navigation.ui.setupActionBarWithNavController
  import androidx.navigation.ui.setupWithNavController
  import com.google.android.material.bottomnavigation.BottomNavigationView
  
  class StaffMainActivity : AppCompatActivity() {
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.staff_main)
  
          val bottomNavigationView = findViewById&lt;BottomNavigationView&gt;(R.id.bottomNavigationView2)
          val navController = findNavController(R.id.fragment3)
  
          val appBarConfiguration = AppBarConfiguration(setOf(R.id.staffHome, R.id.availabilityViewer, R.id.members))
          setupActionBarWithNavController(navController, appBarConfiguration)
  
          bottomNavigationView.setupWithNavController(navController)
  
      }
  }
  </code></pre>
  <p>MemberMainActivity code:</p>
  <pre><code>package com.example.jimsgym
  
  import androidx.appcompat.app.AppCompatActivity
  import android.os.Bundle
  import androidx.navigation.findNavController
  import androidx.navigation.ui.AppBarConfiguration
  import androidx.navigation.ui.setupActionBarWithNavController
  import androidx.navigation.ui.setupWithNavController
  import com.google.android.material.bottomnavigation.BottomNavigationView
  
  class MemberMainActivity : AppCompatActivity() {
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.member_main)
  
          val bottomNavigationView = findViewById&lt;BottomNavigationView&gt;(R.id.bottomNavigationView)
          val navController = findNavController(R.id.fragment)
  
          val appBarConfiguration = AppBarConfiguration(setOf(R.id.memberHome, R.id.availabilitySetter, R.id.bmiCalc))
          setupActionBarWithNavController(navController, appBarConfiguration)
  
          bottomNavigationView.setupWithNavController(navController)
      }
  }
  </code></pre>