Error in Android Studio - "Default Activity Not Found"

Posted 龙种人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error in Android Studio - "Default Activity Not Found"相关的知识,希望对你有一定的参考价值。

Make sure you have specified the default activity in your androidManisfest.xml file. Within your default activity‘s xml<activity> section, there should be these tags:

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

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

这样就会把 MainActivity 这个Activity设置为默认。

以上是关于Error in Android Studio - "Default Activity Not Found"的主要内容,如果未能解决你的问题,请参考以下文章

Android Studio 首坑 Gradle sync failed: Cause: error in opening zip file 的错误

mac android studio 出现 Error: SDK location not found. Define location with sdk.dir in the local.prope

Android Studio 报出此错AAPT: error: unexpected element <intent-filter> found in <manifest><application>.

Android studio报错,Error:Gradle: A problem occurred configuring root project 'MyFuck'.

Android studio 报错AAPT2 error

androidstudio问题