Reputation: 11
I have been following a YouTube tutorial on 2D Game development and when I pressed the run button to check, it shows:
Error runing "app": Default Activity not found
Also it shows an error on AndroidMainfest.xml if I use landscape instead of fullsensor:
<activity android:name=".GameActivity"
android:screenOrientation="landscape"
android:theme="@style/AppTheme.noActionBar"></activity>
<activity
android:name=".MainActivity"
android:screenOrientation="landscape"
android:theme="@style/AppTheme.noActionBar"></activity>
Upvotes: 0
Views: 102
Reputation: 28748
Use intent-filter
:
<activity
android:name=".MainActivity"
android:screenOrientation="landscape"
android:theme="@style/AppTheme.NoActionBar"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And why @style/AppTheme.noActionBar
? Use @style/AppTheme.NoActionBar
.
See also "Default Activity Not Found" on Android Studio upgrade.
Upvotes: 2