The errors are shown in the figure below:
Reason 1:
This is because it is possible that When we delete the activity during the operation, Android Studio automatically removes our activity tag information from the Androidmanifest.XML, but when we create the activity again, it does not automatically fill in our activity information, so we need to fill it out manually.
Reason 1 Solution:
Fill in the Activity tag information in the Androidmanifest.xml:
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Reason 2:
Because of the requirement, projects do not need the Activity class. This is because When you create a project, AndroidStudio defaults to Lunche, which requires activity, so it will report an error.
Reason 2 solutions:
Step 1: Go to the Settings page
Step 2: Set it to Nothing in launch.
Read More:
- [Solved] Could not identify launch activity: Default Activity not found Error while Launching activity
- [Solved] Could not identify launch activity: Default Activity not found Error while Launching activity
- Could not identify launch activity: Default Activity not foundError while Launching activity
- JZVideo Error: Attempt to invoke virtual method ‘android.view.Window android.app.Activity.getWindow()’ on a null object reference
- [Solved] Android 9.0 APP Install Android 4.4 Error: IllegalArgumentException
- [Solved] Manifest merger failed: android:exported needs to be explicitly specified for element <activity#com
- [Solved] Fragment not attached to an activity
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found
- [Solved] Android app development version update failed, Android – error: task execution failed ‘: app: com
- Error while Launching activity [How to Solve]
- [Solved] Android12 Download Error: The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
- How to Solve Error: Android java.lang.IllegalStateException: Could not execute method of the activity
- [Solved] Android9.0 App Install Android4.4 Error: InflateException-You must supply a layout_height attribute.
- Android studio reports an error when running the main() method
- error: resource android:attr/lStar not found [How to Solve]
- [Solved] Android Project error: import android.support.v4 (V7). App.activitycompat
- [Solved] Vscode Error: “export ‘default‘ (imported as ‘VueRouter‘) was not found in ‘vue-router‘
- [Solved] Manifest merger failed: Apps targeting Android 12 and higher are required to specify an explicit
- [Solved] Android Studio Compile Error: Execution failed for task ‘:APP_MIDI:lintVitalRelease‘.