Android Studio运行时出错';应用程序';:未找到默认活动

Android Studio运行时出错';应用程序';:未找到默认活动,android,android-studio,Android,Android Studio,我正在macOS 10.14.5上使用Android Studio 3.4.2。每次我尝试运行我的应用程序时,都会出现以下错误: Error running 'app': Default Activity not found 我已经尝试过这个解决方案()但没有效果 有什么帮助吗?如果使缓存无效/重新启动对您没有帮助,那么 也许您忘记在清单中声明您的活动了 <activity android:name="your.package.YourDefaultActivity">

我正在macOS 10.14.5上使用Android Studio 3.4.2。每次我尝试运行我的应用程序时,都会出现以下错误:

Error running 'app': Default Activity not found
我已经尝试过这个解决方案()但没有效果


有什么帮助吗?

如果
使缓存无效/重新启动
对您没有帮助,那么 也许您忘记在清单中声明您的活动了

   <activity android:name="your.package.YourDefaultActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

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


尝试将其添加到您的清单中,这几行代码告诉系统应用程序应该从哪个活动启动,例如应用程序的输入点,请确保注册默认活动

 <activity
        android:name="org.cocos2dx.cpp.AppActivity"
        android:screenOrientation="portrait"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:launchMode="singleTask"
        android:taskAffinity=""  >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

您是否添加了操作\u主意图过滤器。在清理项目后尝试,构建>清理项目是的,我已经多次清理项目@SagarPoshiya