Error while Launching activity [How to Solve]

1. Use ADB to write in the package restart program ADB uninstall package name
if there is no ADB command:
(1) create a. Bash_profile file (input touch.Bash_profile)
(2) open the. Bash_profile file (input open – E.Bash_profile)
(3) edit in the open. Bash_profile file: export path = ${path} :/users/your own user name/library/Android/SDK/platform tools
after editing, save and exit
(4) execute the command source. Bash_profile;
(5) enter, and the ADB version will succeed if the version number appears. Finally, execute the ADB uninstall package name, output success, and restart the program

2 at manifest Does the XML declare two activities as launchers

3 in the listing, add your first startup class and filter code, copy the whole intent filter and add it to your first startup class

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

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

Read More: