首页 > 解决方案 > 每次当我向我的系统打开班主任的项目时,它都会显示此错误。运行应用程序时出错:未找到默认活动

问题描述

错误

我是Android的初学者。每次当我将班主任的项目打开到我的系统时,它都会显示此错误。

Error running app: Default activity not found.


我应该怎么做才能匹配我老师的同一个项目?我尝试了很多解决方案。

Menu-->Build-->Clean Project[![Menu-->Invalidate Cache and restart

Clean Project[![Menu-->Invalidate Cache and restart

我的清单文件是

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.assigncheckbox">

    <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">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

标签: androidandroid-studioandroid-activity

解决方案


可能是因为您没有将此活动添加到您的AndroidManifest.xml

  <activity
            android:name=".yourActivity"
             />

推荐阅读