简体   繁体   English

活动的意图过滤器必须包含android.intent.aciton.MAIN操作

[英]The intent-filter of the activity must contain android.intent.aciton.MAIN action

"The intent-filter of the activity must contain android.intent.aciton.MAIN action" I get this output trying to run android project in Intelij. “活动的意图过滤器必须包含android.intent.aciton.MAIN操作”,我得到此输出,试图在Intelij中运行android项目。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.android_app"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="10" />

    <application
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name" >
        <activity
                android:label="@string/app_name"
                android:name=".DashboardActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

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

        <!--  Login Activity -->
        <activity
                android:label="Login Account"
                android:name=".LoginActivity"></activity>

    </application>

    <!-- Allow to connect with internet -->
    <uses-permission android:name="android.permission.INTERNET" />

</manifest>

Does anyone has an idea about this? 有人对此有想法吗?

Already found an answer. 已经找到答案了。 Problem was with wrong class passed in run configuration. 问题是在运行配置中传递了错误的类。 It was com.example.android_app.LoginActivity instead com.example.android_app.DashboardActivity . 它是com.example.android_app.LoginActivity而不是com.example.android_app.DashboardActivity Hope any1 find it usefull. 希望任何人都觉得有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM