I\'m new to android and I have encounterded a problem. The console said that \"Could not identify launch activity: Default Activity not found\". I have add
Exit your android studio IDE. Then locate the "caches" folder in .AndroidStudio3.2 folder.
Location
C:\Users\YOUR_USERNAME\.AndroidStudio3.2\system\caches
For example.
Let's assume say YOUR_USERNAME is called Admin.
C:\Users\Admin\.AndroidStudio3.2\system\caches
Delete the caches folder and start your android studio IDE.
In your manifest file there was wrong element name (Activity change to activity) declared
<Activity android:name="com.example.mrrobot.mycoolweather.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>
Change it to:
<activity android:name="com.example.mrrobot.mycoolweather.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>
I have tried solutions here and other questions
at End, activity tag was has <activity android:name="com.exmaple.todo.MainActivity" />
when i changed it to <activity android:name=".MainActivity" />
app worked.
I hope it help you if other solution not work.
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.
i had these issues with my project:
Default activity not found
xml intellisense was not working
kotlin standard functions were not detecting
All my above issues were resolved by Deleting System cache of Android Studio 3.3 at the home path, and it's working nicely for me,, Steps:
exit Android Studio
Go to path > C:\Users\YOUR_WINDOW_USER_NAME.AndroidStudio3.3\system
Then you have a \caches folder, delete this caches folder
Now open Android Studio and load your project
Worked for me.. i wasted couple of hours resolving this issue and finally it got resolved in this way.
My main activity was not declared in Android Manifest File. That's the reason which came that error. This error come because of a declaration problem of Android Manifest file. Please check it. :D