Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Activity not found #2

Open
winster opened this issue Oct 24, 2016 · 21 comments

Comments

Projects
None yet
@winster
Copy link

commented Oct 24, 2016

Since there is no activity defined in the manifest, getting error in Android studio.

Error running app:
Default Activity not found

@tjohns

This comment has been minimized.

Copy link

commented Oct 27, 2016

Yes, this is correct. This is an input manager, not an activity.

You can get Android Studio not to complain by going to the "Edit Configurations" menu (tap "Shift" three times, type "Edit Configurations"), then change Launch Options > Launch to "Nothing".

I'll probably add a generic activity containing instructions, just to avoid any confusion.

@tjohns tjohns self-assigned this Oct 27, 2016

@111usman

This comment has been minimized.

Copy link

commented Feb 22, 2018

Thanks a lot

@iletai

This comment has been minimized.

Copy link

commented Jul 19, 2018

thanks you @tjohns

@neilakoh

This comment has been minimized.

Copy link

commented Aug 6, 2018

I also got the same error; however, in my case it was straightforward since this error occurred in a fresh project and it turns out I have to add an intent inside activity tag to get rid of the error:

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

See reference:

https://www.aboutonline.info/2018/08/error-running-app-default-activity-not-found-on-android-with-kotlin.html

@IDFDeveloper

This comment has been minimized.

Copy link

commented Oct 11, 2018

@tjohns i agree with you that if we change that setting then app works fine but what if want to run the app without edit Edit Configuration ? I have checked this stack overflow question's answers to solve this issue in android studio 3.2
I have spend almost 5 hours and got the solution. I have copy that project and run in another system then its working fine, So just do following solution to fix this issue and it is work for me and i hope some one will get help with this.
Solution :

  1. Delete the cash from your %Home%\.gradle\cash and sync project again.
  2. Also check that is there any duplicate tag in your Manifest.
@hishark

This comment has been minimized.

Copy link

commented Oct 20, 2018

@AndroidNinza thank you!!!! I spend one night to find solution, I'm trying your solution and it is downloading now, hope I can solve it and then go to bed:'-(

@hishark

This comment has been minimized.

Copy link

commented Oct 20, 2018

@AndroidNinza done!!!!!!!! thank you!!!!!!!!! 😭 😭 😭
perfect solution

@JoinBelieve

This comment has been minimized.

Copy link

commented Oct 27, 2018

@IDFDeveloper thank you very mach!!

@moyarich

This comment has been minimized.

Copy link

commented Nov 9, 2018

@IDFDeveloper thank you very

1. Delete the caches from your `%Home%\.gradle\caches` and sync project again.

that worked really well for me. I tried file>invalidate caches/restart and that did not work for me

@davidofug

This comment has been minimized.

Copy link

commented Nov 21, 2018

I lost over 6 hours hunting down the problem. I even redownload gradle, restarted Android studio, Invalidated cache/restart to no vail. Until a sister pointed me to this wonderful thread.

This came to my rescue.

@tjohns i agree with you that if we change that setting then app works fine but what if want to run the app without edit Edit Configuration ? I have checked this stack overflow question's answers to solve this issue in android studio 3.2
I have spend almost 5 hours and got the solution. I have copy that project and run in another system then its working fine, So just do following solution to fix this issue and it is work for me and i hope some one will get help with this.
Solution :

1. Delete the cash from your `%Home%\.gradle\cash` and sync project again.

2. Also check that is there in no any duplicate tag in your Manifest.
@yashkatkar

This comment has been minimized.

Copy link

commented Nov 23, 2018

I was Scrathing GOOGLE for this answer
and at last Found
#2 (comment)

@Johnyoat

This comment has been minimized.

Copy link

commented Nov 24, 2018

I had to delete %Home%\.gradle , %Home%\AndroidStudio3.2 before i got it to work.

@YimasoftLiuGuanJun

This comment has been minimized.

Copy link

commented Dec 7, 2018

I had to delete %Home%\.gradle , %Home%\AndroidStudio3.2 before i got it to work.

me too

@andreirusu99

This comment has been minimized.

Copy link

commented Dec 15, 2018

Make sure your application label and your activity label are not the same string resource when declared in the Android Manifest

@PauloVilarinho

This comment has been minimized.

Copy link

commented Feb 5, 2019

how do i delete this %home%.gradle\cash im not finding it.

@AjitPGaikwad

This comment has been minimized.

Copy link

commented Feb 7, 2019

Make sure your application label and your activity label are not the same string resource when declared in the Android Manifest

This is accepted answer in my case

@zoro238

This comment has been minimized.

Copy link

commented Feb 13, 2019

how do i delete this %home%.gradle\cash i am not finding it.

@ankitk20

This comment has been minimized.

Copy link

commented Feb 28, 2019

Go to your users home directory and there you will find .gradle folder

@hawkraph

This comment has been minimized.

Copy link

commented Mar 10, 2019

I deleted android studio cache;
path: C:\Users\user.AndroidStudio3.3\system\caches
(1). Close android studio (2). delete cache (3). start android studio
I just noticed deleting cache also solve my XML autocompletion of attributes problem.
The problem seems to be with android studio and not the gradle files of the project. None of the invalidate cache or delete iml and idea files worked for me.

@shoaibmushtaq25

This comment has been minimized.

Copy link

commented Mar 18, 2019

i had these issues with my project:

  1. Default activity not found

  2. xml intellisense was not working

  3. 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:

  4. exit Android Studio

  5. Go to path > C:\Users\YOUR_WINDOW_USER_NAME\.AndroidStudio3.3\system

  6. Then you have a \caches folder, delete this caches folder

  7. 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.

@benja420

This comment has been minimized.

Copy link

commented May 9, 2019

tanks this resolved my problem mexico....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.