The activity 'MainActivity' is not declared in AndroidManifest.xmlNo IDEA annotations attached to the JDK 1.8 (C:…), some issues will not be foundActivity Declaration in AndroidManifest.xmlAndroid studio - MainActivity not declared over and overHow to save an Android Activity state using save instance state?Activity restart on rotation AndroidStrange out of memory issue while loading an image to a Bitmap objectHow to declare global variables in Android?Fling gesture detection on grid layoutStop EditText from gaining focus at Activity startupExample: Communication between Activity and Service using MessagingfindViewById in FragmentYou need to use a Theme.AppCompat theme (or descendant) with this activityThis Activity already has an action bar supplied by the window decor

Erratic behavior by an internal employee against an external employee

Capacitors with a "/" on schematic

How quickly could a country build a tall concrete wall around a city?

Word or idiom defining something barely functional

Where to pee in London?

What is the German idiom or expression for when someone is being hypocritical against their own teachings?

How can I make Ubuntu run well (including with wifi) on a 32-bit machine?

Short story about a teenager who has his brain replaced with a microchip (Psychological Horror)

In the movie Harry Potter and the Order or the Phoenix, why didn't Mr. Filch succeed to open the Room of Requirement if it's what he needed?

What does Fisher mean by this quote?

Need help understanding lens reach

Finish the Mastermind

Using Select on Dataset with missing keys

Is it allowed and safe to carry a passenger / non-pilot in the front seat of a small general aviation airplane?

What are these mathematical groups in U.S. universities?

Why is there a need to prevent a racist, sexist, or otherwise bigoted vendor from discriminating who they sell to?

Decode a variable-length quantity

Is this cheap "air conditioner" able to cool a room?

Did Apollo leave poop on the moon?

Our group keeps dying during the Lost Mine of Phandelver campaign. What are we doing wrong?

How can glass marbles naturally occur in a desert?

Unexpected route on a flight from USA to Europe

Will a paper be retracted if a flaw in released software code invalidates its central idea?

If there were no space agencies, could a person go to space?



The activity 'MainActivity' is not declared in AndroidManifest.xml


No IDEA annotations attached to the JDK 1.8 (C:…), some issues will not be foundActivity Declaration in AndroidManifest.xmlAndroid studio - MainActivity not declared over and overHow to save an Android Activity state using save instance state?Activity restart on rotation AndroidStrange out of memory issue while loading an image to a Bitmap objectHow to declare global variables in Android?Fling gesture detection on grid layoutStop EditText from gaining focus at Activity startupExample: Communication between Activity and Service using MessagingfindViewById in FragmentYou need to use a Theme.AppCompat theme (or descendant) with this activityThis Activity already has an action bar supplied by the window decor






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am getting an error which reads The activity 'MainActivity' is not declared in AndroidManifest.xml



Screenshot of the error



What is the problem here?










share|improve this question


























  • From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

    – Francesc
    Oct 21 '16 at 19:01












  • is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

    – Opiatefuchs
    Oct 21 '16 at 19:02











  • Please don't post screenshots of code.

    – BSMP
    Oct 21 '16 at 19:03











  • Can you please put the log and your AndroidManifest.xml code here?

    – Sourabh
    Oct 22 '16 at 10:32






  • 1





    stackoverflow.com/questions/50740240/… this is how it worked for me.

    – Muhammad Ahmed
    Jan 2 at 15:25

















0















I am getting an error which reads The activity 'MainActivity' is not declared in AndroidManifest.xml



Screenshot of the error



What is the problem here?










share|improve this question


























  • From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

    – Francesc
    Oct 21 '16 at 19:01












  • is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

    – Opiatefuchs
    Oct 21 '16 at 19:02











  • Please don't post screenshots of code.

    – BSMP
    Oct 21 '16 at 19:03











  • Can you please put the log and your AndroidManifest.xml code here?

    – Sourabh
    Oct 22 '16 at 10:32






  • 1





    stackoverflow.com/questions/50740240/… this is how it worked for me.

    – Muhammad Ahmed
    Jan 2 at 15:25













0












0








0








I am getting an error which reads The activity 'MainActivity' is not declared in AndroidManifest.xml



Screenshot of the error



What is the problem here?










share|improve this question
















I am getting an error which reads The activity 'MainActivity' is not declared in AndroidManifest.xml



Screenshot of the error



What is the problem here?







android xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 21 '16 at 20:45









Robin Daugherty

4,1831 gold badge30 silver badges44 bronze badges




4,1831 gold badge30 silver badges44 bronze badges










asked Oct 21 '16 at 18:57









Jodhvir SinghJodhvir Singh

161 gold badge1 silver badge2 bronze badges




161 gold badge1 silver badge2 bronze badges















  • From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

    – Francesc
    Oct 21 '16 at 19:01












  • is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

    – Opiatefuchs
    Oct 21 '16 at 19:02











  • Please don't post screenshots of code.

    – BSMP
    Oct 21 '16 at 19:03











  • Can you please put the log and your AndroidManifest.xml code here?

    – Sourabh
    Oct 22 '16 at 10:32






  • 1





    stackoverflow.com/questions/50740240/… this is how it worked for me.

    – Muhammad Ahmed
    Jan 2 at 15:25

















  • From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

    – Francesc
    Oct 21 '16 at 19:01












  • is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

    – Opiatefuchs
    Oct 21 '16 at 19:02











  • Please don't post screenshots of code.

    – BSMP
    Oct 21 '16 at 19:03











  • Can you please put the log and your AndroidManifest.xml code here?

    – Sourabh
    Oct 22 '16 at 10:32






  • 1





    stackoverflow.com/questions/50740240/… this is how it worked for me.

    – Muhammad Ahmed
    Jan 2 at 15:25
















From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

– Francesc
Oct 21 '16 at 19:01






From the screenshot, because the activity is red, I would guess you have it in the wrong package. Can you share a screenshot of your main activity?

– Francesc
Oct 21 '16 at 19:01














is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

– Opiatefuchs
Oct 21 '16 at 19:02





is there a whitespace before ".MainActivity" ? It looks like there is one before the point(.)...

– Opiatefuchs
Oct 21 '16 at 19:02













Please don't post screenshots of code.

– BSMP
Oct 21 '16 at 19:03





Please don't post screenshots of code.

– BSMP
Oct 21 '16 at 19:03













Can you please put the log and your AndroidManifest.xml code here?

– Sourabh
Oct 22 '16 at 10:32





Can you please put the log and your AndroidManifest.xml code here?

– Sourabh
Oct 22 '16 at 10:32




1




1





stackoverflow.com/questions/50740240/… this is how it worked for me.

– Muhammad Ahmed
Jan 2 at 15:25





stackoverflow.com/questions/50740240/… this is how it worked for me.

– Muhammad Ahmed
Jan 2 at 15:25












12 Answers
12






active

oldest

votes


















7














I got this error when moving a lot of files, to fix just resync your gradle files.



File->Sync Project with Gradle Files






share|improve this answer
































    3














    Sometimes when moving or renaming files, you can have broken XML files. My case that the ic_launcher.xml was corrupt. I regenerated that and worked just fine.



    Check every XML in your proyect.






    share|improve this answer
































      1














      You are most likely just missing the below from your AndroidManifest:



      <activity
      android:name=".MainActivity"
      android:label="@string/app_name"


      Here is a full example of an AndroidManifest:



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

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





      share|improve this answer

























      • I used your code and the error still persists. Plz tell if you need any other file code.

        – Jodhvir Singh
        Oct 22 '16 at 6:13











      • Could you update your answer and show me the manifest?

        – Prad
        Oct 22 '16 at 10:58


















      1














      Try to go to File->Invalidate Caches / Restard and choose invaliadate and restart ,it worked for me






      share|improve this answer
































        1














        This can be only two reason,



        the bold one, missing extend statement



        class MainActvity extends AppCompatActivity 


        or



        you are using a wrong package name to register your activity so just in this case use ALT+Space then studio will show the options itself.






        share|improve this answer


































          0














          replace in your AndroidManifest.xml



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

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

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

          </manifest>





          share|improve this answer

























          • I used this code and the error still persists

            – Jodhvir Singh
            Oct 22 '16 at 6:13











          • please edit your question and show us the main activity

            – meladandroid
            Oct 22 '16 at 11:06


















          0














          You should try this



          <activity
          android:name="com.example.stockquote.StockInfoActivity"
          android:label="@string/app_name"
          />


          For more detail you can check hereActivity declare






          share|improve this answer


































            0














            Thanks everyone for taking the time out to help a beginner.
            I found out that I had somehow misspelled the Package in MainActivity.java
            When I corrected it the error was gone.
            Thank you all.






            share|improve this answer
































              0














              I was getting an error "The activity 'MainActivity' is not declared in AndroidManifest.xml", even though it was correct in the manifest file.



              My problem was that when I created the project I had to mark the item "Use AndroidX artifacts".






              share|improve this answer
































                0














                If you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.



                File -> Invalidate Caches / Restart...





                share|improve this answer
































                  0














                  All of my XML file were cut in half for some reason, I'm not sure when it happened (I use Git VCS, so maybe that). I had to go through each of them and restore the code.






                  share|improve this answer
































                    0














                    It have three ways to resolve



                    1:-
                    Go File->Invalidate Caches / choose invalidate and restart ,it works



                    2:-
                    If you make MainActivity make sure you have onCreate method in it and extend with AppCompatActivity .



                    3:- And last option sync project with Gradle file






                    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%2f40183700%2fthe-activity-mainactivity-is-not-declared-in-androidmanifest-xml%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown

























                      12 Answers
                      12






                      active

                      oldest

                      votes








                      12 Answers
                      12






                      active

                      oldest

                      votes









                      active

                      oldest

                      votes






                      active

                      oldest

                      votes









                      7














                      I got this error when moving a lot of files, to fix just resync your gradle files.



                      File->Sync Project with Gradle Files






                      share|improve this answer





























                        7














                        I got this error when moving a lot of files, to fix just resync your gradle files.



                        File->Sync Project with Gradle Files






                        share|improve this answer



























                          7












                          7








                          7







                          I got this error when moving a lot of files, to fix just resync your gradle files.



                          File->Sync Project with Gradle Files






                          share|improve this answer













                          I got this error when moving a lot of files, to fix just resync your gradle files.



                          File->Sync Project with Gradle Files







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 20 at 17:40









                          MRDJR97MRDJR97

                          3412 gold badges5 silver badges15 bronze badges




                          3412 gold badges5 silver badges15 bronze badges


























                              3














                              Sometimes when moving or renaming files, you can have broken XML files. My case that the ic_launcher.xml was corrupt. I regenerated that and worked just fine.



                              Check every XML in your proyect.






                              share|improve this answer





























                                3














                                Sometimes when moving or renaming files, you can have broken XML files. My case that the ic_launcher.xml was corrupt. I regenerated that and worked just fine.



                                Check every XML in your proyect.






                                share|improve this answer



























                                  3












                                  3








                                  3







                                  Sometimes when moving or renaming files, you can have broken XML files. My case that the ic_launcher.xml was corrupt. I regenerated that and worked just fine.



                                  Check every XML in your proyect.






                                  share|improve this answer













                                  Sometimes when moving or renaming files, you can have broken XML files. My case that the ic_launcher.xml was corrupt. I regenerated that and worked just fine.



                                  Check every XML in your proyect.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Nov 29 '18 at 23:10









                                  Mariano LMariano L

                                  5591 gold badge7 silver badges29 bronze badges




                                  5591 gold badge7 silver badges29 bronze badges
























                                      1














                                      You are most likely just missing the below from your AndroidManifest:



                                      <activity
                                      android:name=".MainActivity"
                                      android:label="@string/app_name"


                                      Here is a full example of an AndroidManifest:



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

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





                                      share|improve this answer

























                                      • I used your code and the error still persists. Plz tell if you need any other file code.

                                        – Jodhvir Singh
                                        Oct 22 '16 at 6:13











                                      • Could you update your answer and show me the manifest?

                                        – Prad
                                        Oct 22 '16 at 10:58















                                      1














                                      You are most likely just missing the below from your AndroidManifest:



                                      <activity
                                      android:name=".MainActivity"
                                      android:label="@string/app_name"


                                      Here is a full example of an AndroidManifest:



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

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





                                      share|improve this answer

























                                      • I used your code and the error still persists. Plz tell if you need any other file code.

                                        – Jodhvir Singh
                                        Oct 22 '16 at 6:13











                                      • Could you update your answer and show me the manifest?

                                        – Prad
                                        Oct 22 '16 at 10:58













                                      1












                                      1








                                      1







                                      You are most likely just missing the below from your AndroidManifest:



                                      <activity
                                      android:name=".MainActivity"
                                      android:label="@string/app_name"


                                      Here is a full example of an AndroidManifest:



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

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





                                      share|improve this answer













                                      You are most likely just missing the below from your AndroidManifest:



                                      <activity
                                      android:name=".MainActivity"
                                      android:label="@string/app_name"


                                      Here is a full example of an AndroidManifest:



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

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






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 21 '16 at 19:05









                                      PradPrad

                                      4757 silver badges15 bronze badges




                                      4757 silver badges15 bronze badges















                                      • I used your code and the error still persists. Plz tell if you need any other file code.

                                        – Jodhvir Singh
                                        Oct 22 '16 at 6:13











                                      • Could you update your answer and show me the manifest?

                                        – Prad
                                        Oct 22 '16 at 10:58

















                                      • I used your code and the error still persists. Plz tell if you need any other file code.

                                        – Jodhvir Singh
                                        Oct 22 '16 at 6:13











                                      • Could you update your answer and show me the manifest?

                                        – Prad
                                        Oct 22 '16 at 10:58
















                                      I used your code and the error still persists. Plz tell if you need any other file code.

                                      – Jodhvir Singh
                                      Oct 22 '16 at 6:13





                                      I used your code and the error still persists. Plz tell if you need any other file code.

                                      – Jodhvir Singh
                                      Oct 22 '16 at 6:13













                                      Could you update your answer and show me the manifest?

                                      – Prad
                                      Oct 22 '16 at 10:58





                                      Could you update your answer and show me the manifest?

                                      – Prad
                                      Oct 22 '16 at 10:58











                                      1














                                      Try to go to File->Invalidate Caches / Restard and choose invaliadate and restart ,it worked for me






                                      share|improve this answer





























                                        1














                                        Try to go to File->Invalidate Caches / Restard and choose invaliadate and restart ,it worked for me






                                        share|improve this answer



























                                          1












                                          1








                                          1







                                          Try to go to File->Invalidate Caches / Restard and choose invaliadate and restart ,it worked for me






                                          share|improve this answer













                                          Try to go to File->Invalidate Caches / Restard and choose invaliadate and restart ,it worked for me







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Dec 17 '18 at 17:59









                                          Lucian GabrielLucian Gabriel

                                          135 bronze badges




                                          135 bronze badges
























                                              1














                                              This can be only two reason,



                                              the bold one, missing extend statement



                                              class MainActvity extends AppCompatActivity 


                                              or



                                              you are using a wrong package name to register your activity so just in this case use ALT+Space then studio will show the options itself.






                                              share|improve this answer































                                                1














                                                This can be only two reason,



                                                the bold one, missing extend statement



                                                class MainActvity extends AppCompatActivity 


                                                or



                                                you are using a wrong package name to register your activity so just in this case use ALT+Space then studio will show the options itself.






                                                share|improve this answer





























                                                  1












                                                  1








                                                  1







                                                  This can be only two reason,



                                                  the bold one, missing extend statement



                                                  class MainActvity extends AppCompatActivity 


                                                  or



                                                  you are using a wrong package name to register your activity so just in this case use ALT+Space then studio will show the options itself.






                                                  share|improve this answer















                                                  This can be only two reason,



                                                  the bold one, missing extend statement



                                                  class MainActvity extends AppCompatActivity 


                                                  or



                                                  you are using a wrong package name to register your activity so just in this case use ALT+Space then studio will show the options itself.







                                                  share|improve this answer














                                                  share|improve this answer



                                                  share|improve this answer








                                                  edited Jan 13 at 12:00









                                                  Andre Batista

                                                  962 silver badges9 bronze badges




                                                  962 silver badges9 bronze badges










                                                  answered Oct 21 '16 at 19:00









                                                  Pavneet_SinghPavneet_Singh

                                                  27.6k5 gold badges29 silver badges46 bronze badges




                                                  27.6k5 gold badges29 silver badges46 bronze badges
























                                                      0














                                                      replace in your AndroidManifest.xml



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

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

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

                                                      </manifest>





                                                      share|improve this answer

























                                                      • I used this code and the error still persists

                                                        – Jodhvir Singh
                                                        Oct 22 '16 at 6:13











                                                      • please edit your question and show us the main activity

                                                        – meladandroid
                                                        Oct 22 '16 at 11:06















                                                      0














                                                      replace in your AndroidManifest.xml



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

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

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

                                                      </manifest>





                                                      share|improve this answer

























                                                      • I used this code and the error still persists

                                                        – Jodhvir Singh
                                                        Oct 22 '16 at 6:13











                                                      • please edit your question and show us the main activity

                                                        – meladandroid
                                                        Oct 22 '16 at 11:06













                                                      0












                                                      0








                                                      0







                                                      replace in your AndroidManifest.xml



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

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

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

                                                      </manifest>





                                                      share|improve this answer













                                                      replace in your AndroidManifest.xml



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

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

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

                                                      </manifest>






                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Oct 21 '16 at 19:03









                                                      meladandroidmeladandroid

                                                      291 silver badge8 bronze badges




                                                      291 silver badge8 bronze badges















                                                      • I used this code and the error still persists

                                                        – Jodhvir Singh
                                                        Oct 22 '16 at 6:13











                                                      • please edit your question and show us the main activity

                                                        – meladandroid
                                                        Oct 22 '16 at 11:06

















                                                      • I used this code and the error still persists

                                                        – Jodhvir Singh
                                                        Oct 22 '16 at 6:13











                                                      • please edit your question and show us the main activity

                                                        – meladandroid
                                                        Oct 22 '16 at 11:06
















                                                      I used this code and the error still persists

                                                      – Jodhvir Singh
                                                      Oct 22 '16 at 6:13





                                                      I used this code and the error still persists

                                                      – Jodhvir Singh
                                                      Oct 22 '16 at 6:13













                                                      please edit your question and show us the main activity

                                                      – meladandroid
                                                      Oct 22 '16 at 11:06





                                                      please edit your question and show us the main activity

                                                      – meladandroid
                                                      Oct 22 '16 at 11:06











                                                      0














                                                      You should try this



                                                      <activity
                                                      android:name="com.example.stockquote.StockInfoActivity"
                                                      android:label="@string/app_name"
                                                      />


                                                      For more detail you can check hereActivity declare






                                                      share|improve this answer































                                                        0














                                                        You should try this



                                                        <activity
                                                        android:name="com.example.stockquote.StockInfoActivity"
                                                        android:label="@string/app_name"
                                                        />


                                                        For more detail you can check hereActivity declare






                                                        share|improve this answer





























                                                          0












                                                          0








                                                          0







                                                          You should try this



                                                          <activity
                                                          android:name="com.example.stockquote.StockInfoActivity"
                                                          android:label="@string/app_name"
                                                          />


                                                          For more detail you can check hereActivity declare






                                                          share|improve this answer















                                                          You should try this



                                                          <activity
                                                          android:name="com.example.stockquote.StockInfoActivity"
                                                          android:label="@string/app_name"
                                                          />


                                                          For more detail you can check hereActivity declare







                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited May 23 '17 at 12:31









                                                          Community

                                                          11 silver badge




                                                          11 silver badge










                                                          answered Oct 21 '16 at 19:09









                                                          Aby NavAby Nav

                                                          1




                                                          1
























                                                              0














                                                              Thanks everyone for taking the time out to help a beginner.
                                                              I found out that I had somehow misspelled the Package in MainActivity.java
                                                              When I corrected it the error was gone.
                                                              Thank you all.






                                                              share|improve this answer





























                                                                0














                                                                Thanks everyone for taking the time out to help a beginner.
                                                                I found out that I had somehow misspelled the Package in MainActivity.java
                                                                When I corrected it the error was gone.
                                                                Thank you all.






                                                                share|improve this answer



























                                                                  0












                                                                  0








                                                                  0







                                                                  Thanks everyone for taking the time out to help a beginner.
                                                                  I found out that I had somehow misspelled the Package in MainActivity.java
                                                                  When I corrected it the error was gone.
                                                                  Thank you all.






                                                                  share|improve this answer













                                                                  Thanks everyone for taking the time out to help a beginner.
                                                                  I found out that I had somehow misspelled the Package in MainActivity.java
                                                                  When I corrected it the error was gone.
                                                                  Thank you all.







                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Oct 22 '16 at 7:15









                                                                  Jodhvir SinghJodhvir Singh

                                                                  161 gold badge1 silver badge2 bronze badges




                                                                  161 gold badge1 silver badge2 bronze badges
























                                                                      0














                                                                      I was getting an error "The activity 'MainActivity' is not declared in AndroidManifest.xml", even though it was correct in the manifest file.



                                                                      My problem was that when I created the project I had to mark the item "Use AndroidX artifacts".






                                                                      share|improve this answer





























                                                                        0














                                                                        I was getting an error "The activity 'MainActivity' is not declared in AndroidManifest.xml", even though it was correct in the manifest file.



                                                                        My problem was that when I created the project I had to mark the item "Use AndroidX artifacts".






                                                                        share|improve this answer



























                                                                          0












                                                                          0








                                                                          0







                                                                          I was getting an error "The activity 'MainActivity' is not declared in AndroidManifest.xml", even though it was correct in the manifest file.



                                                                          My problem was that when I created the project I had to mark the item "Use AndroidX artifacts".






                                                                          share|improve this answer













                                                                          I was getting an error "The activity 'MainActivity' is not declared in AndroidManifest.xml", even though it was correct in the manifest file.



                                                                          My problem was that when I created the project I had to mark the item "Use AndroidX artifacts".







                                                                          share|improve this answer












                                                                          share|improve this answer



                                                                          share|improve this answer










                                                                          answered Feb 24 at 10:02









                                                                          KseniyaKseniya

                                                                          1




                                                                          1
























                                                                              0














                                                                              If you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.



                                                                              File -> Invalidate Caches / Restart...





                                                                              share|improve this answer





























                                                                                0














                                                                                If you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.



                                                                                File -> Invalidate Caches / Restart...





                                                                                share|improve this answer



























                                                                                  0












                                                                                  0








                                                                                  0







                                                                                  If you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.



                                                                                  File -> Invalidate Caches / Restart...





                                                                                  share|improve this answer













                                                                                  If you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.



                                                                                  File -> Invalidate Caches / Restart...






                                                                                  share|improve this answer












                                                                                  share|improve this answer



                                                                                  share|improve this answer










                                                                                  answered Mar 27 at 5:54









                                                                                  ZubairZubair

                                                                                  15 bronze badges




                                                                                  15 bronze badges
























                                                                                      0














                                                                                      All of my XML file were cut in half for some reason, I'm not sure when it happened (I use Git VCS, so maybe that). I had to go through each of them and restore the code.






                                                                                      share|improve this answer





























                                                                                        0














                                                                                        All of my XML file were cut in half for some reason, I'm not sure when it happened (I use Git VCS, so maybe that). I had to go through each of them and restore the code.






                                                                                        share|improve this answer



























                                                                                          0












                                                                                          0








                                                                                          0







                                                                                          All of my XML file were cut in half for some reason, I'm not sure when it happened (I use Git VCS, so maybe that). I had to go through each of them and restore the code.






                                                                                          share|improve this answer













                                                                                          All of my XML file were cut in half for some reason, I'm not sure when it happened (I use Git VCS, so maybe that). I had to go through each of them and restore the code.







                                                                                          share|improve this answer












                                                                                          share|improve this answer



                                                                                          share|improve this answer










                                                                                          answered Apr 11 at 9:06









                                                                                          sp00kysp00ky

                                                                                          468 bronze badges




                                                                                          468 bronze badges
























                                                                                              0














                                                                                              It have three ways to resolve



                                                                                              1:-
                                                                                              Go File->Invalidate Caches / choose invalidate and restart ,it works



                                                                                              2:-
                                                                                              If you make MainActivity make sure you have onCreate method in it and extend with AppCompatActivity .



                                                                                              3:- And last option sync project with Gradle file






                                                                                              share|improve this answer





























                                                                                                0














                                                                                                It have three ways to resolve



                                                                                                1:-
                                                                                                Go File->Invalidate Caches / choose invalidate and restart ,it works



                                                                                                2:-
                                                                                                If you make MainActivity make sure you have onCreate method in it and extend with AppCompatActivity .



                                                                                                3:- And last option sync project with Gradle file






                                                                                                share|improve this answer



























                                                                                                  0












                                                                                                  0








                                                                                                  0







                                                                                                  It have three ways to resolve



                                                                                                  1:-
                                                                                                  Go File->Invalidate Caches / choose invalidate and restart ,it works



                                                                                                  2:-
                                                                                                  If you make MainActivity make sure you have onCreate method in it and extend with AppCompatActivity .



                                                                                                  3:- And last option sync project with Gradle file






                                                                                                  share|improve this answer













                                                                                                  It have three ways to resolve



                                                                                                  1:-
                                                                                                  Go File->Invalidate Caches / choose invalidate and restart ,it works



                                                                                                  2:-
                                                                                                  If you make MainActivity make sure you have onCreate method in it and extend with AppCompatActivity .



                                                                                                  3:- And last option sync project with Gradle file







                                                                                                  share|improve this answer












                                                                                                  share|improve this answer



                                                                                                  share|improve this answer










                                                                                                  answered Apr 11 at 9:11









                                                                                                  AhmadAhmad

                                                                                                  1401 silver badge11 bronze badges




                                                                                                  1401 silver badge11 bronze badges






























                                                                                                      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%2f40183700%2fthe-activity-mainactivity-is-not-declared-in-androidmanifest-xml%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

                                                                                                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                                                                                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                                                                                                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현