1

Whenever I try running my application - this window in the screenshot is popping up in my screen. Stating that default activity is not found because of this I am not able to deploy my app:

enter image description here

Manifest file of my code

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mcs.oodoeg" >

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android3.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity2"
            android:label="@string/app_name" >

        </activity>
        <activity
            android:name=".Sigin"
            android:label="@string/app_name" >
        </activity>
    </application>

</manifest>

This is what the window which I am getting while clicking the Run-> Edit Congiguration:

enter image description here

Gradle file of my code:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.example.mcs.oodoeg"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

        packagingOptions {
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/DEPENDENCIES'
        }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile files('libs/xmlrpc-client-3.1.3.jar')
    compile files('libs/gson-2.2.2.jar')
}
PowerStat
  • 3,757
  • 8
  • 32
  • 57
HariPriya
  • 81
  • 1
  • 1
  • 5
  • Please add some clarity- what window is popping up? Is this a result of a recent change you made to some code? It is unclear what you are asking. – chsbellboy Feb 11 '16 at 04:25
  • it is because configuration to the app is messed up, you gotta fix that first before you run the app – Pankaj Nimgade Feb 11 '16 at 04:28
  • i din make any changes in my code certainly when i tried deploying the application in my device it popped up that window in my screenshot – HariPriya Feb 11 '16 at 04:48

11 Answers11

34

I had a similar problem, the issue was the device.

When you uninstalled the app (to install it again after running project), instead of actually uninstalling it, it deactivated it.

That means, the app was still installed but it was blocked by OS.

So I couldn't run the project, and no more information was given. (Activity launcher not found was the only message)

Effectively deleting the app (going through device settings) solved the issue.

htafoya
  • 18,261
  • 11
  • 80
  • 104
  • 2
    This worked for me, thank you. so you just have to go to Settings > Apps > your app > Uninstall instead of dragging it from launcher – Ali Obeid Oct 12 '17 at 13:44
  • This worked for me too, on my Android phone I have multiple profiles – al404IT Apr 02 '19 at 14:34
  • The app is already uninstalled but it is still giving error while installing and as it is uninstalled it is not being listed in App List – Dharmik Thakkar Oct 03 '19 at 07:26
6

The error occurs when you delete the app when you are still testing it on your phone. The app shows as deleted because it disappears from your launcher, To fully delete the app follow the steps below.

It worked perfectly after clicking on settings => Apps & notification => App info => find the name of the app => on top right corner click on the three dots => Uninstall for all users.

user3568896
  • 97
  • 1
  • 9
5

try this if you upgrade android studio IDEA

File -> Invalidate Caches / Restart... ref. link=> Default Activity not found in Android Studio

Community
  • 1
  • 1
Vishal Thakkar
  • 2,117
  • 2
  • 16
  • 33
4

It's working perfectly for me after clicking on settings => Apps & notification => App info => find the name of the app => on top right corner click on the three dots => Uninstall for all users.

Shoaib Mushtaq
  • 595
  • 4
  • 17
2

it's studio setting problem. please click app => Edit Configrations => Deploy. select Default apk and apply.after click ok

kyrie
  • 21
  • 1
1
  1. Restart your IDE.
  2. Clean your project, goto Build > Clean Project.
  3. Run again and see if your error is resolved.

Go to Run > Edit configuration and check this detail. Check this image

Rana Ranvijay Singh
  • 6,055
  • 3
  • 38
  • 54
Learning Always
  • 1,563
  • 4
  • 29
  • 49
1

I faced the same problem.

Solved by going to the other user account on my phone and uninstall the app. Seems this problem is caused by first installing this app on "A" user account then we uninstall this app in "B" account. So when we try to run our app again in "B" account the old app is still exist in "A" account.

1

I solved the issue by uninstalling the app on my device for other user.

  • when you run the app on your device installation will happen for every user on your device

  • uninstalling the app only uninstall it for the current user you are using on the device

0

In my case the problem was due to the emulator which started in "safe mode" making impossible to run on the device, changing emulator device worked.

Andrea Leganza
  • 447
  • 7
  • 7
0

just find the application on your phone and Uninstall it.

and Clean the app and run it again.

Sana Ebadi
  • 6,656
  • 2
  • 44
  • 44
0

All the answers above didn't help me. Renaming the activity worked for me. For example, ErrorActivity threw this error. ErrActivity - no. enter image description here

enter image description here

Leonid Ivankin
  • 579
  • 4
  • 9