title: How to fix "Default Activity not found" when I have set the activity in android manifest file?
body: <p>First of all, I have read similar questions to mine and have tried out all the solutions recommended. These solutions includes:</p>
  
  <ol>
  <li>Invalidate cache and restart </li>
  <li>Sync with gradle </li>
  <li>Restarting Android Studio </li>
  <li>Clean and Build </li>
  <li>Change the configurations to "Nothing" on the Launcher section </li>
  <li>Changing the android:name on manifest file to a full package name (E.g:com.example.acer.alertbox.ActivityName)</li>
  </ol>
  
  <p>None of these solutions seems to be working, and i keep getting the error mesage saying that "Default activity not found". I have been trying to figure this out for a week already so I hope someone will give me a new solution apart from those 6 that I have mentioned above. Below is my android manifest code which seems fine to me and that which i have checked multiple times.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            package="com.example.acer.alertbox"&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE"/&gt;
  
      &lt;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"
              tools:ignore="GoogleAppIndexingWarning"&gt;
  
         &lt;activity android:name=".MainActivity"&gt;
             &lt;intent-filter&gt;
                 &lt;action android:name="android.intent.action.MAIN"/&gt;
                 &lt;category android:name="android.intent.category.LAUNCHER"/&gt;
             &lt;/intent-filter&gt;
         &lt;/activity&gt;
  
          &lt;activity
                  android:name=".LoginActivity"
                  android:parentActivityName=".MainActivity"&gt;
          &lt;/activity&gt;
          &lt;activity
                  android:name=".RegisterActivity"
                  android:parentActivityName=".MainActivity"&gt;
          &lt;/activity&gt;
          &lt;activity
                  android:name=".SendActivity"
                  android:parentActivityName=".MainActivity"&gt;
          &lt;/activity&gt;
          &lt;activity
                  android:name=".Profile"
                  android:parentActivityName=".MainActivity"&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".NotificationActivity"&gt;
                    &lt;intent-filter&gt;
                        &lt;action android:name="com.example.acer.alertbox.TARGETNOTIFICATION"&gt;
                        &lt;/action&gt;
                    &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;service
              android:name=".FirebaseMessagingService"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.google.firebase.MESSAGING_EVENT"&gt;
                  &lt;/action&gt;
              &lt;/intent-filter&gt;
          &lt;/service&gt;
  
          &lt;meta-data
                  android:name="com.google.firebase.messaging.default_notification_channel_id"
                  android:value="@string/default_notification_channel_id" /&gt;
  
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Updated: I have uninstalled and reinstalled Android Studio, the problem is solved but another one came. The "Run" button is not doing anything when i clicked on it and i got a warning at the bottom right corner saying internal IDE error: unable to locate adb. I have downloaded the adb file and locate it on this directory C:/Acer/Users/Local/Sdk but still it doesnt change anything. I have also restart, sync the project gradle file etc. but nothing works!! Please someone help me. Below is what i got from the internal error report:</p>
  
  <pre><code>Unable to locate adb
  java.lang.IllegalArgumentException: Unable to locate adb
      at com.android.tools.idea.run.editor.DeployTargetPickerDialog.&lt;init&gt;(DeployTargetPickerDialog.java:131)
      at com.android.tools.idea.run.editor.ShowChooserTargetProvider.showPrompt(ShowChooserTargetProvider.java:113)
      at com.android.tools.idea.run.AndroidRunConfigurationBase.getDeployTarget(AndroidRunConfigurationBase.java:605)
      at com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:287)
      at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:158)
      at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:55)
      at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50)
      at com.intellij.execution.ProgramRunnerUtil.executeConfigurationAsync(ProgramRunnerUtil.java:97)
      at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:44)
      at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:111)
      at com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:59)
      at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:439)
      at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:231)
      at com.intellij.util.Alarm$Request.runSafely(Alarm.java:405)
      at com.intellij.util.Alarm$Request.access$700(Alarm.java:330)
      at com.intellij.util.Alarm$Request$1.run(Alarm.java:371)
      at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
      at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:447)
      at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:431)
      at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
      at java.awt.EventQueue.access$500(EventQueue.java:98)
      at java.awt.EventQueue$3.run(EventQueue.java:715)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
      at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
      at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
      at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
  </code></pre>
  
  <p>Latest update: Problem solved by restoring adb.exe from Avast antivirus.</p>