Could not identify launch activity: Unable to list apks Error while Launching activity

Viewed 1817

i keep getting this error in every project even when i create a new project

Could not identify launch activity: Unable to list apks Error while Launching activity

i have tried uninstalling android studio and still nothing.

2 Answers

You need to add intent-filter tag to the activity which you want to declare as Launch Activity in AndroidManifest.xml file , like the following code

<activity
        android:name=".LaunchActivity"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

I was able to locate the source of the error: after creating a New Project, in the window for "Select a Project Template", I was selecting "NO Activity", which was causing this issue. If you select "Empty Activity" it should solve the problem.

Related