Could not identify launch Activity: Default Activity not found
Although the question is kind of outdated, I would add the following to all the given answers:
For multi-module projects check carefully that you modify the Manifest
corresponding to the Configuration
you are trying to run.
Had the same problem and spent 20 minutes just to discover that I was trying to run wrong configuration (with an Application
in ModulbeB
, while thinking that I was running one from ModuleA
).
And sometimes you are working on other module default runnable module changes so you have to change it.
Sometimes it is solved just restarting Android Studio
I had the "Default Activity not found" problem a couple of times and I could solved restarting my android Studio.
If you see that error occur after upgrading your IDEA, upgrading Android Studio version, or Generating a new APK, you may need to refresh the IDE's cache.
File -> Invalidate Caches / Restart...
For main activity in your manifest you have to add this with category LAUNCHER
(First Activity on launch app):
<activity
android:name=".MainActivity"
android:label="YourAppName"
android:theme="@style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
For other activity you have to change category to DEFAULT
:
<activity
android:name=".OtherActivity"
android:theme="@style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="package.OtherActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Check this Activity and this Start Another Activity
So your code is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mrrobot.mycoolweather" >
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".activity.ChooseAreaActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>