Android studio Default Activity not found












6















After i have created my own appplication class:



package com.example.bezzabarovaa.myapplication;
import android.app.Application;
import android.content.Context;

/**
* Created by bezzabarovaa on 04.08.2017.
*/

public class app extends Application {
public static Context context;

@Override public void onCreate() {
super.onCreate();
context = getApplicationContext();
}

}


and have changed manifest.xml (changed application to app class)



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

<app
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label = "@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

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




I`ve got a message Error running Unnamed: Default Activity not found



If I will change my classapp back to application in manifest.xml - everything is ok.
Where is a problem?
Thank you.










share|improve this question























  • Where's your Activity?

    – SripadRaj
    Aug 4 '17 at 13:20











  • what makes you think you can change the tag name and it won't break?

    – Tim Castelijns
    Aug 4 '17 at 13:20






  • 2





    You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

    – shimatai
    Aug 4 '17 at 14:17


















6















After i have created my own appplication class:



package com.example.bezzabarovaa.myapplication;
import android.app.Application;
import android.content.Context;

/**
* Created by bezzabarovaa on 04.08.2017.
*/

public class app extends Application {
public static Context context;

@Override public void onCreate() {
super.onCreate();
context = getApplicationContext();
}

}


and have changed manifest.xml (changed application to app class)



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

<app
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label = "@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

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




I`ve got a message Error running Unnamed: Default Activity not found



If I will change my classapp back to application in manifest.xml - everything is ok.
Where is a problem?
Thank you.










share|improve this question























  • Where's your Activity?

    – SripadRaj
    Aug 4 '17 at 13:20











  • what makes you think you can change the tag name and it won't break?

    – Tim Castelijns
    Aug 4 '17 at 13:20






  • 2





    You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

    – shimatai
    Aug 4 '17 at 14:17
















6












6








6








After i have created my own appplication class:



package com.example.bezzabarovaa.myapplication;
import android.app.Application;
import android.content.Context;

/**
* Created by bezzabarovaa on 04.08.2017.
*/

public class app extends Application {
public static Context context;

@Override public void onCreate() {
super.onCreate();
context = getApplicationContext();
}

}


and have changed manifest.xml (changed application to app class)



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

<app
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label = "@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

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




I`ve got a message Error running Unnamed: Default Activity not found



If I will change my classapp back to application in manifest.xml - everything is ok.
Where is a problem?
Thank you.










share|improve this question














After i have created my own appplication class:



package com.example.bezzabarovaa.myapplication;
import android.app.Application;
import android.content.Context;

/**
* Created by bezzabarovaa on 04.08.2017.
*/

public class app extends Application {
public static Context context;

@Override public void onCreate() {
super.onCreate();
context = getApplicationContext();
}

}


and have changed manifest.xml (changed application to app class)



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

<app
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label = "@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

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




I`ve got a message Error running Unnamed: Default Activity not found



If I will change my classapp back to application in manifest.xml - everything is ok.
Where is a problem?
Thank you.







android android-manifest






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 4 '17 at 13:19









Андрей БАндрей Б

3112




3112













  • Where's your Activity?

    – SripadRaj
    Aug 4 '17 at 13:20











  • what makes you think you can change the tag name and it won't break?

    – Tim Castelijns
    Aug 4 '17 at 13:20






  • 2





    You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

    – shimatai
    Aug 4 '17 at 14:17





















  • Where's your Activity?

    – SripadRaj
    Aug 4 '17 at 13:20











  • what makes you think you can change the tag name and it won't break?

    – Tim Castelijns
    Aug 4 '17 at 13:20






  • 2





    You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

    – shimatai
    Aug 4 '17 at 14:17



















Where's your Activity?

– SripadRaj
Aug 4 '17 at 13:20





Where's your Activity?

– SripadRaj
Aug 4 '17 at 13:20













what makes you think you can change the tag name and it won't break?

– Tim Castelijns
Aug 4 '17 at 13:20





what makes you think you can change the tag name and it won't break?

– Tim Castelijns
Aug 4 '17 at 13:20




2




2





You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

– shimatai
Aug 4 '17 at 14:17







You can't change the tag names! You should use <application android:name=".app"> and please follow the Java guidelines, where a class name should be CamelCase (not app, but App in your case).

– shimatai
Aug 4 '17 at 14:17














8 Answers
8






active

oldest

votes


















8














This <app is supposed to be <application you specify your custom app in here:



<application android:name=".app" ...


Check the documentation the name section says:




The fully qualified name of an Application subclass implemented for
the application. When the application process is started, this class
is instantiated before any of the application's components. The
subclass is optional; most applications won't need one. In the absence
of a subclass, Android uses an instance of the base Application class.




Full example (with your code):



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

<application
android:name=".app"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label = "@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

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





share|improve this answer

































    3














    Solved by clicking the "Sync project with gradle files"






    share|improve this answer































      2














      use below code snippet



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

      <application
      android:name=".app"
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:theme="@style/AppTheme">
      <activity android:name=".MainActivity"
      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>




      Hope this will help you.






      share|improve this answer
























      • How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

        – Cody Gray
        Aug 4 '17 at 13:29








      • 1





        @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

        – 0xDEADC0DE
        Aug 4 '17 at 13:32





















      1














      I faced the same problem a while ago, after changing my default activity to another.



      What solved it was invalidate caches and restart Android Studio:



      File -> Invalidate Caches / Restart...



      and then clicking on Invalidate and Restart.






      share|improve this answer































        0














        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.






        share|improve this answer































          0














          Add below line in your manifest application tag



          <application
          android:name=".app"
          ...
          </application>





          share|improve this answer





















          • 2





            How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

            – Cody Gray
            Aug 4 '17 at 13:29



















          -1














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

          <uses-feature
          android:name="android.hardware.bluetooth_le"
          android:required="false" />

          <uses-permission android:name="android.permission.BLUETOOTH" />
          <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
          <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
          <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

          <application
          android:icon="@drawable/app_icon"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.Holo.Light">
          <activity
          android:name="com.example.android.bluetoothlegatt.DeviceScanActivity"
          android:icon="@drawable/app_icon"
          android:label="@string/app_name">
          <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <action android:name="android.intent.action.VIEW" />

          <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
          </activity>
          <activity android:name="com.example.android.bluetoothlegatt.DeviceControlActivity" />

          <service android:name="com.example.android.bluetoothlegatt.BluetoothLeService" />
          </application>

          </manifest>





          share|improve this answer



















          • 2





            At least give some definition to your answer, it would be confusing to leave code without description.

            – Akshay Paliwal
            Oct 12 '18 at 7:10











          • check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

            – HARI HARAN
            Oct 12 '18 at 8:37













          • @HARIHARAN, topic starter already has it.

            – CoolMind
            Oct 12 '18 at 11:01











          • As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

            – Janis F
            Oct 12 '18 at 14:57



















          -1














          I solved the very same issue by following steps



          Close Android Studio



          deleting from :



          C:Usersyour user name.android/log and gradle folder



          C:Usersyour user name.gradle



          from C:Users[your user name]



          Restart Computer and run Android studio (it Will take some time to rebuild)






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45507940%2fandroid-studio-default-activity-not-found%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            8 Answers
            8






            active

            oldest

            votes








            8 Answers
            8






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            8














            This <app is supposed to be <application you specify your custom app in here:



            <application android:name=".app" ...


            Check the documentation the name section says:




            The fully qualified name of an Application subclass implemented for
            the application. When the application process is started, this class
            is instantiated before any of the application's components. The
            subclass is optional; most applications won't need one. In the absence
            of a subclass, Android uses an instance of the base Application class.




            Full example (with your code):



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

            <application
            android:name=".app"
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".MainActivity"
            android:label = "@string/app_name">

            <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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





            share|improve this answer






























              8














              This <app is supposed to be <application you specify your custom app in here:



              <application android:name=".app" ...


              Check the documentation the name section says:




              The fully qualified name of an Application subclass implemented for
              the application. When the application process is started, this class
              is instantiated before any of the application's components. The
              subclass is optional; most applications won't need one. In the absence
              of a subclass, Android uses an instance of the base Application class.




              Full example (with your code):



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

              <application
              android:name=".app"
              android:allowBackup="true"
              android:icon="@mipmap/ic_launcher"
              android:label="@string/app_name"
              android:roundIcon="@mipmap/ic_launcher_round"
              android:supportsRtl="true"
              android:theme="@style/AppTheme">
              <activity android:name=".MainActivity"
              android:label = "@string/app_name">

              <intent-filter>
              <action android:name="android.intent.action.MAIN" />

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





              share|improve this answer




























                8












                8








                8







                This <app is supposed to be <application you specify your custom app in here:



                <application android:name=".app" ...


                Check the documentation the name section says:




                The fully qualified name of an Application subclass implemented for
                the application. When the application process is started, this class
                is instantiated before any of the application's components. The
                subclass is optional; most applications won't need one. In the absence
                of a subclass, Android uses an instance of the base Application class.




                Full example (with your code):



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

                <application
                android:name=".app"
                android:allowBackup="true"
                android:icon="@mipmap/ic_launcher"
                android:label="@string/app_name"
                android:roundIcon="@mipmap/ic_launcher_round"
                android:supportsRtl="true"
                android:theme="@style/AppTheme">
                <activity android:name=".MainActivity"
                android:label = "@string/app_name">

                <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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





                share|improve this answer















                This <app is supposed to be <application you specify your custom app in here:



                <application android:name=".app" ...


                Check the documentation the name section says:




                The fully qualified name of an Application subclass implemented for
                the application. When the application process is started, this class
                is instantiated before any of the application's components. The
                subclass is optional; most applications won't need one. In the absence
                of a subclass, Android uses an instance of the base Application class.




                Full example (with your code):



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

                <application
                android:name=".app"
                android:allowBackup="true"
                android:icon="@mipmap/ic_launcher"
                android:label="@string/app_name"
                android:roundIcon="@mipmap/ic_launcher_round"
                android:supportsRtl="true"
                android:theme="@style/AppTheme">
                <activity android:name=".MainActivity"
                android:label = "@string/app_name">

                <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 4 '17 at 13:29

























                answered Aug 4 '17 at 13:21









                Matias OloccoMatias Olocco

                41939




                41939

























                    3














                    Solved by clicking the "Sync project with gradle files"






                    share|improve this answer




























                      3














                      Solved by clicking the "Sync project with gradle files"






                      share|improve this answer


























                        3












                        3








                        3







                        Solved by clicking the "Sync project with gradle files"






                        share|improve this answer













                        Solved by clicking the "Sync project with gradle files"







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Dec 8 '18 at 3:42









                        Polycarp KavooPolycarp Kavoo

                        475410




                        475410























                            2














                            use below code snippet



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

                            <application
                            android:name=".app"
                            android:allowBackup="true"
                            android:icon="@mipmap/ic_launcher"
                            android:label="@string/app_name"
                            android:roundIcon="@mipmap/ic_launcher_round"
                            android:supportsRtl="true"
                            android:theme="@style/AppTheme">
                            <activity android:name=".MainActivity"
                            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>




                            Hope this will help you.






                            share|improve this answer
























                            • How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                              – Cody Gray
                              Aug 4 '17 at 13:29








                            • 1





                              @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                              – 0xDEADC0DE
                              Aug 4 '17 at 13:32


















                            2














                            use below code snippet



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

                            <application
                            android:name=".app"
                            android:allowBackup="true"
                            android:icon="@mipmap/ic_launcher"
                            android:label="@string/app_name"
                            android:roundIcon="@mipmap/ic_launcher_round"
                            android:supportsRtl="true"
                            android:theme="@style/AppTheme">
                            <activity android:name=".MainActivity"
                            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>




                            Hope this will help you.






                            share|improve this answer
























                            • How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                              – Cody Gray
                              Aug 4 '17 at 13:29








                            • 1





                              @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                              – 0xDEADC0DE
                              Aug 4 '17 at 13:32
















                            2












                            2








                            2







                            use below code snippet



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

                            <application
                            android:name=".app"
                            android:allowBackup="true"
                            android:icon="@mipmap/ic_launcher"
                            android:label="@string/app_name"
                            android:roundIcon="@mipmap/ic_launcher_round"
                            android:supportsRtl="true"
                            android:theme="@style/AppTheme">
                            <activity android:name=".MainActivity"
                            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>




                            Hope this will help you.






                            share|improve this answer













                            use below code snippet



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

                            <application
                            android:name=".app"
                            android:allowBackup="true"
                            android:icon="@mipmap/ic_launcher"
                            android:label="@string/app_name"
                            android:roundIcon="@mipmap/ic_launcher_round"
                            android:supportsRtl="true"
                            android:theme="@style/AppTheme">
                            <activity android:name=".MainActivity"
                            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>




                            Hope this will help you.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Aug 4 '17 at 13:24









                            Anurag ShrivastavaAnurag Shrivastava

                            502419




                            502419













                            • How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                              – Cody Gray
                              Aug 4 '17 at 13:29








                            • 1





                              @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                              – 0xDEADC0DE
                              Aug 4 '17 at 13:32





















                            • How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                              – Cody Gray
                              Aug 4 '17 at 13:29








                            • 1





                              @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                              – 0xDEADC0DE
                              Aug 4 '17 at 13:32



















                            How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                            – Cody Gray
                            Aug 4 '17 at 13:29







                            How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                            – Cody Gray
                            Aug 4 '17 at 13:29






                            1




                            1





                            @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                            – 0xDEADC0DE
                            Aug 4 '17 at 13:32







                            @CodyGray; The asker's code does not include android:name=".app" part while this (and the other answer) does

                            – 0xDEADC0DE
                            Aug 4 '17 at 13:32













                            1














                            I faced the same problem a while ago, after changing my default activity to another.



                            What solved it was invalidate caches and restart Android Studio:



                            File -> Invalidate Caches / Restart...



                            and then clicking on Invalidate and Restart.






                            share|improve this answer




























                              1














                              I faced the same problem a while ago, after changing my default activity to another.



                              What solved it was invalidate caches and restart Android Studio:



                              File -> Invalidate Caches / Restart...



                              and then clicking on Invalidate and Restart.






                              share|improve this answer


























                                1












                                1








                                1







                                I faced the same problem a while ago, after changing my default activity to another.



                                What solved it was invalidate caches and restart Android Studio:



                                File -> Invalidate Caches / Restart...



                                and then clicking on Invalidate and Restart.






                                share|improve this answer













                                I faced the same problem a while ago, after changing my default activity to another.



                                What solved it was invalidate caches and restart Android Studio:



                                File -> Invalidate Caches / Restart...



                                and then clicking on Invalidate and Restart.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Aug 4 '17 at 13:24









                                GuilhermeFGLGuilhermeFGL

                                1,2282628




                                1,2282628























                                    0














                                    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.






                                    share|improve this answer




























                                      0














                                      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.






                                      share|improve this answer


























                                        0












                                        0








                                        0







                                        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.






                                        share|improve this answer













                                        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.







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Aug 25 '17 at 16:34









                                        Morteza DjangjooMorteza Djangjoo

                                        756317




                                        756317























                                            0














                                            Add below line in your manifest application tag



                                            <application
                                            android:name=".app"
                                            ...
                                            </application>





                                            share|improve this answer





















                                            • 2





                                              How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                              – Cody Gray
                                              Aug 4 '17 at 13:29
















                                            0














                                            Add below line in your manifest application tag



                                            <application
                                            android:name=".app"
                                            ...
                                            </application>





                                            share|improve this answer





















                                            • 2





                                              How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                              – Cody Gray
                                              Aug 4 '17 at 13:29














                                            0












                                            0








                                            0







                                            Add below line in your manifest application tag



                                            <application
                                            android:name=".app"
                                            ...
                                            </application>





                                            share|improve this answer















                                            Add below line in your manifest application tag



                                            <application
                                            android:name=".app"
                                            ...
                                            </application>






                                            share|improve this answer














                                            share|improve this answer



                                            share|improve this answer








                                            edited Apr 2 '18 at 6:29









                                            Gowthaman M

                                            4,64861840




                                            4,64861840










                                            answered Aug 4 '17 at 13:23









                                            Vishal VaishnavVishal Vaishnav

                                            2,0172932




                                            2,0172932








                                            • 2





                                              How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                              – Cody Gray
                                              Aug 4 '17 at 13:29














                                            • 2





                                              How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                              – Cody Gray
                                              Aug 4 '17 at 13:29








                                            2




                                            2





                                            How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                            – Cody Gray
                                            Aug 4 '17 at 13:29





                                            How does this code solve the asker's problem? He already says he knows it works if he changes it back to <application>. That's exactly what you've recommended here.

                                            – Cody Gray
                                            Aug 4 '17 at 13:29











                                            -1














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

                                            <uses-feature
                                            android:name="android.hardware.bluetooth_le"
                                            android:required="false" />

                                            <uses-permission android:name="android.permission.BLUETOOTH" />
                                            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
                                            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
                                            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

                                            <application
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name"
                                            android:theme="@android:style/Theme.Holo.Light">
                                            <activity
                                            android:name="com.example.android.bluetoothlegatt.DeviceScanActivity"
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name">
                                            <intent-filter>
                                            <action android:name="android.intent.action.MAIN" />
                                            <action android:name="android.intent.action.VIEW" />

                                            <category android:name="android.intent.category.LAUNCHER" />
                                            </intent-filter>
                                            </activity>
                                            <activity android:name="com.example.android.bluetoothlegatt.DeviceControlActivity" />

                                            <service android:name="com.example.android.bluetoothlegatt.BluetoothLeService" />
                                            </application>

                                            </manifest>





                                            share|improve this answer



















                                            • 2





                                              At least give some definition to your answer, it would be confusing to leave code without description.

                                              – Akshay Paliwal
                                              Oct 12 '18 at 7:10











                                            • check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                              – HARI HARAN
                                              Oct 12 '18 at 8:37













                                            • @HARIHARAN, topic starter already has it.

                                              – CoolMind
                                              Oct 12 '18 at 11:01











                                            • As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                              – Janis F
                                              Oct 12 '18 at 14:57
















                                            -1














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

                                            <uses-feature
                                            android:name="android.hardware.bluetooth_le"
                                            android:required="false" />

                                            <uses-permission android:name="android.permission.BLUETOOTH" />
                                            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
                                            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
                                            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

                                            <application
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name"
                                            android:theme="@android:style/Theme.Holo.Light">
                                            <activity
                                            android:name="com.example.android.bluetoothlegatt.DeviceScanActivity"
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name">
                                            <intent-filter>
                                            <action android:name="android.intent.action.MAIN" />
                                            <action android:name="android.intent.action.VIEW" />

                                            <category android:name="android.intent.category.LAUNCHER" />
                                            </intent-filter>
                                            </activity>
                                            <activity android:name="com.example.android.bluetoothlegatt.DeviceControlActivity" />

                                            <service android:name="com.example.android.bluetoothlegatt.BluetoothLeService" />
                                            </application>

                                            </manifest>





                                            share|improve this answer



















                                            • 2





                                              At least give some definition to your answer, it would be confusing to leave code without description.

                                              – Akshay Paliwal
                                              Oct 12 '18 at 7:10











                                            • check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                              – HARI HARAN
                                              Oct 12 '18 at 8:37













                                            • @HARIHARAN, topic starter already has it.

                                              – CoolMind
                                              Oct 12 '18 at 11:01











                                            • As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                              – Janis F
                                              Oct 12 '18 at 14:57














                                            -1












                                            -1








                                            -1







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

                                            <uses-feature
                                            android:name="android.hardware.bluetooth_le"
                                            android:required="false" />

                                            <uses-permission android:name="android.permission.BLUETOOTH" />
                                            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
                                            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
                                            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

                                            <application
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name"
                                            android:theme="@android:style/Theme.Holo.Light">
                                            <activity
                                            android:name="com.example.android.bluetoothlegatt.DeviceScanActivity"
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name">
                                            <intent-filter>
                                            <action android:name="android.intent.action.MAIN" />
                                            <action android:name="android.intent.action.VIEW" />

                                            <category android:name="android.intent.category.LAUNCHER" />
                                            </intent-filter>
                                            </activity>
                                            <activity android:name="com.example.android.bluetoothlegatt.DeviceControlActivity" />

                                            <service android:name="com.example.android.bluetoothlegatt.BluetoothLeService" />
                                            </application>

                                            </manifest>





                                            share|improve this answer













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

                                            <uses-feature
                                            android:name="android.hardware.bluetooth_le"
                                            android:required="false" />

                                            <uses-permission android:name="android.permission.BLUETOOTH" />
                                            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
                                            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
                                            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

                                            <application
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name"
                                            android:theme="@android:style/Theme.Holo.Light">
                                            <activity
                                            android:name="com.example.android.bluetoothlegatt.DeviceScanActivity"
                                            android:icon="@drawable/app_icon"
                                            android:label="@string/app_name">
                                            <intent-filter>
                                            <action android:name="android.intent.action.MAIN" />
                                            <action android:name="android.intent.action.VIEW" />

                                            <category android:name="android.intent.category.LAUNCHER" />
                                            </intent-filter>
                                            </activity>
                                            <activity android:name="com.example.android.bluetoothlegatt.DeviceControlActivity" />

                                            <service android:name="com.example.android.bluetoothlegatt.BluetoothLeService" />
                                            </application>

                                            </manifest>






                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Oct 12 '18 at 4:23









                                            HARI HARANHARI HARAN

                                            1




                                            1








                                            • 2





                                              At least give some definition to your answer, it would be confusing to leave code without description.

                                              – Akshay Paliwal
                                              Oct 12 '18 at 7:10











                                            • check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                              – HARI HARAN
                                              Oct 12 '18 at 8:37













                                            • @HARIHARAN, topic starter already has it.

                                              – CoolMind
                                              Oct 12 '18 at 11:01











                                            • As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                              – Janis F
                                              Oct 12 '18 at 14:57














                                            • 2





                                              At least give some definition to your answer, it would be confusing to leave code without description.

                                              – Akshay Paliwal
                                              Oct 12 '18 at 7:10











                                            • check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                              – HARI HARAN
                                              Oct 12 '18 at 8:37













                                            • @HARIHARAN, topic starter already has it.

                                              – CoolMind
                                              Oct 12 '18 at 11:01











                                            • As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                              – Janis F
                                              Oct 12 '18 at 14:57








                                            2




                                            2





                                            At least give some definition to your answer, it would be confusing to leave code without description.

                                            – Akshay Paliwal
                                            Oct 12 '18 at 7:10





                                            At least give some definition to your answer, it would be confusing to leave code without description.

                                            – Akshay Paliwal
                                            Oct 12 '18 at 7:10













                                            check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                            – HARI HARAN
                                            Oct 12 '18 at 8:37







                                            check whether is " <category android:name="android.intent.category.LAUNCHER" />" in intent-filter

                                            – HARI HARAN
                                            Oct 12 '18 at 8:37















                                            @HARIHARAN, topic starter already has it.

                                            – CoolMind
                                            Oct 12 '18 at 11:01





                                            @HARIHARAN, topic starter already has it.

                                            – CoolMind
                                            Oct 12 '18 at 11:01













                                            As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                            – Janis F
                                            Oct 12 '18 at 14:57





                                            As it currently stands, this is a poor quality answer. Please provide an explanation of the code, and maybe emphasize the specific problem you solved.

                                            – Janis F
                                            Oct 12 '18 at 14:57











                                            -1














                                            I solved the very same issue by following steps



                                            Close Android Studio



                                            deleting from :



                                            C:Usersyour user name.android/log and gradle folder



                                            C:Usersyour user name.gradle



                                            from C:Users[your user name]



                                            Restart Computer and run Android studio (it Will take some time to rebuild)






                                            share|improve this answer




























                                              -1














                                              I solved the very same issue by following steps



                                              Close Android Studio



                                              deleting from :



                                              C:Usersyour user name.android/log and gradle folder



                                              C:Usersyour user name.gradle



                                              from C:Users[your user name]



                                              Restart Computer and run Android studio (it Will take some time to rebuild)






                                              share|improve this answer


























                                                -1












                                                -1








                                                -1







                                                I solved the very same issue by following steps



                                                Close Android Studio



                                                deleting from :



                                                C:Usersyour user name.android/log and gradle folder



                                                C:Usersyour user name.gradle



                                                from C:Users[your user name]



                                                Restart Computer and run Android studio (it Will take some time to rebuild)






                                                share|improve this answer













                                                I solved the very same issue by following steps



                                                Close Android Studio



                                                deleting from :



                                                C:Usersyour user name.android/log and gradle folder



                                                C:Usersyour user name.gradle



                                                from C:Users[your user name]



                                                Restart Computer and run Android studio (it Will take some time to rebuild)







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Nov 16 '18 at 9:11









                                                Ali SidhuAli Sidhu

                                                71




                                                71






























                                                    draft saved

                                                    draft discarded




















































                                                    Thanks for contributing an answer to Stack Overflow!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid



                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.


                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function () {
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45507940%2fandroid-studio-default-activity-not-found%23new-answer', 'question_page');
                                                    }
                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown







                                                    Popular posts from this blog

                                                    Xamarin.iOS Cant Deploy on Iphone

                                                    Glorious Revolution

                                                    Dulmage-Mendelsohn matrix decomposition in Python