Reputation: 206
I am using Android Studio 3.4.2 on macOS 10.14.5. Every time I try to run my app, I get the following error:
Error running 'app': Default Activity not found
I tried this solution already (Error: Default Activity Not Found) but it didn't help.
Any help?
Upvotes: 0
Views: 449
Reputation: 2457
Make sure you register your default 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>
Also make sure your selected module & default activity is correct
Upvotes: 0
Reputation: 2966
If Invalidate Caches/Restart
did not help you, then
maybe you forget to declare Your Activity in Manifest
<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>
Try to add this into your manifest, This lines of code tell the system from which activity Application should start, like an entering point of your app
Upvotes: 1