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设置为默认。

程序猿必读

上一篇:Android开发在Activity外申请权限调用相机打开相册


下一篇:[android开发篇]activity组件篇