Missing project.gradle in Android View










10















In Android Studio, project.gradle file is not show when in Android View, but is when in Project view



Android View
enter image description here



Project View
enter image description here



How can I fix this ??










share|improve this question
























  • Works fine in android studio 2.3.3

    – ahasbini
    Sep 18 '17 at 0:53











  • Related post - Missing top-level build.gradle in multi-module project

    – RBT
    Aug 13 '18 at 8:09















10















In Android Studio, project.gradle file is not show when in Android View, but is when in Project view



Android View
enter image description here



Project View
enter image description here



How can I fix this ??










share|improve this question
























  • Works fine in android studio 2.3.3

    – ahasbini
    Sep 18 '17 at 0:53











  • Related post - Missing top-level build.gradle in multi-module project

    – RBT
    Aug 13 '18 at 8:09













10












10








10


4






In Android Studio, project.gradle file is not show when in Android View, but is when in Project view



Android View
enter image description here



Project View
enter image description here



How can I fix this ??










share|improve this question
















In Android Studio, project.gradle file is not show when in Android View, but is when in Project view



Android View
enter image description here



Project View
enter image description here



How can I fix this ??







android android-studio android-gradle android-studio-3.0






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 20 '18 at 12:36









CodeChimp

3,47163046




3,47163046










asked Sep 15 '17 at 0:42









Jongz PuangputJongz Puangput

2,75463171




2,75463171












  • Works fine in android studio 2.3.3

    – ahasbini
    Sep 18 '17 at 0:53











  • Related post - Missing top-level build.gradle in multi-module project

    – RBT
    Aug 13 '18 at 8:09

















  • Works fine in android studio 2.3.3

    – ahasbini
    Sep 18 '17 at 0:53











  • Related post - Missing top-level build.gradle in multi-module project

    – RBT
    Aug 13 '18 at 8:09
















Works fine in android studio 2.3.3

– ahasbini
Sep 18 '17 at 0:53





Works fine in android studio 2.3.3

– ahasbini
Sep 18 '17 at 0:53













Related post - Missing top-level build.gradle in multi-module project

– RBT
Aug 13 '18 at 8:09





Related post - Missing top-level build.gradle in multi-module project

– RBT
Aug 13 '18 at 8:09












5 Answers
5






active

oldest

votes


















13














The trigger to this 'buggy' phenomenon actually lies outside your project folder.



Assuming a project name of 'SilverBirch', try this:

(a) Close the project in Android Studio 3.0.1.

(b) Rename your project folder (inside the workspace folder) to 'SilverBitch'

(c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')

(d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:

(e) Tick the (old) project name and click OK.

(f) At last your 'Android' view shows build.gradle(Project:SilverBitch)

(g) Repeat whole process, renaming back to original.



Alternatively, if you're insane, do this:

Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)



C:Users<userid>.AndroidStudio3.0systemgradleProjects5be1ee38project.dat


[The system-generated hex-string container name will vary, but the file is always project.dat]

The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.

Delete the file AND its containing folder then re-open the project via Android Studio.



Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
the entire Projects file [C:Users<userid>.AndroidStudio3.0systemgradleProjects]
So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.






share|improve this answer

























  • Worked like a charm. Thank you!

    – Grisgram
    May 6 '18 at 7:15











  • Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

    – Christian
    Sep 25 '18 at 7:18



















1














  1. Right Click on "Gradle Scripts"

  2. Click Load/Unload modules

  3. Load unloaded project module

  4. Done





share|improve this answer






























    0














    This worked for me:



    In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.



    Now my build.gradle (Project: X) shows.






    share|improve this answer






























      0














      In my case, I found that my project.iml located in project/.idea
      So I move it to project/
      and change one line like following:



      <module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />


      the old one should look like this:



      <module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />


      After that, go back to android studio, every thing seems perfect!






      share|improve this answer






























        0














        Close Android Studio. Remove project .idea folder. Open Android Studio -> Open your project. This worked for me!






        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%2f46230078%2fmissing-project-gradle-in-android-view%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          13














          The trigger to this 'buggy' phenomenon actually lies outside your project folder.



          Assuming a project name of 'SilverBirch', try this:

          (a) Close the project in Android Studio 3.0.1.

          (b) Rename your project folder (inside the workspace folder) to 'SilverBitch'

          (c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')

          (d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:

          (e) Tick the (old) project name and click OK.

          (f) At last your 'Android' view shows build.gradle(Project:SilverBitch)

          (g) Repeat whole process, renaming back to original.



          Alternatively, if you're insane, do this:

          Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)



          C:Users<userid>.AndroidStudio3.0systemgradleProjects5be1ee38project.dat


          [The system-generated hex-string container name will vary, but the file is always project.dat]

          The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.

          Delete the file AND its containing folder then re-open the project via Android Studio.



          Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
          the entire Projects file [C:Users<userid>.AndroidStudio3.0systemgradleProjects]
          So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.






          share|improve this answer

























          • Worked like a charm. Thank you!

            – Grisgram
            May 6 '18 at 7:15











          • Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

            – Christian
            Sep 25 '18 at 7:18
















          13














          The trigger to this 'buggy' phenomenon actually lies outside your project folder.



          Assuming a project name of 'SilverBirch', try this:

          (a) Close the project in Android Studio 3.0.1.

          (b) Rename your project folder (inside the workspace folder) to 'SilverBitch'

          (c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')

          (d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:

          (e) Tick the (old) project name and click OK.

          (f) At last your 'Android' view shows build.gradle(Project:SilverBitch)

          (g) Repeat whole process, renaming back to original.



          Alternatively, if you're insane, do this:

          Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)



          C:Users<userid>.AndroidStudio3.0systemgradleProjects5be1ee38project.dat


          [The system-generated hex-string container name will vary, but the file is always project.dat]

          The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.

          Delete the file AND its containing folder then re-open the project via Android Studio.



          Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
          the entire Projects file [C:Users<userid>.AndroidStudio3.0systemgradleProjects]
          So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.






          share|improve this answer

























          • Worked like a charm. Thank you!

            – Grisgram
            May 6 '18 at 7:15











          • Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

            – Christian
            Sep 25 '18 at 7:18














          13












          13








          13







          The trigger to this 'buggy' phenomenon actually lies outside your project folder.



          Assuming a project name of 'SilverBirch', try this:

          (a) Close the project in Android Studio 3.0.1.

          (b) Rename your project folder (inside the workspace folder) to 'SilverBitch'

          (c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')

          (d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:

          (e) Tick the (old) project name and click OK.

          (f) At last your 'Android' view shows build.gradle(Project:SilverBitch)

          (g) Repeat whole process, renaming back to original.



          Alternatively, if you're insane, do this:

          Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)



          C:Users<userid>.AndroidStudio3.0systemgradleProjects5be1ee38project.dat


          [The system-generated hex-string container name will vary, but the file is always project.dat]

          The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.

          Delete the file AND its containing folder then re-open the project via Android Studio.



          Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
          the entire Projects file [C:Users<userid>.AndroidStudio3.0systemgradleProjects]
          So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.






          share|improve this answer















          The trigger to this 'buggy' phenomenon actually lies outside your project folder.



          Assuming a project name of 'SilverBirch', try this:

          (a) Close the project in Android Studio 3.0.1.

          (b) Rename your project folder (inside the workspace folder) to 'SilverBitch'

          (c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')

          (d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:

          (e) Tick the (old) project name and click OK.

          (f) At last your 'Android' view shows build.gradle(Project:SilverBitch)

          (g) Repeat whole process, renaming back to original.



          Alternatively, if you're insane, do this:

          Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)



          C:Users<userid>.AndroidStudio3.0systemgradleProjects5be1ee38project.dat


          [The system-generated hex-string container name will vary, but the file is always project.dat]

          The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.

          Delete the file AND its containing folder then re-open the project via Android Studio.



          Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
          the entire Projects file [C:Users<userid>.AndroidStudio3.0systemgradleProjects]
          So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 14 '18 at 8:28

























          answered Feb 14 '18 at 8:21









          Bad LoserBad Loser

          559515




          559515












          • Worked like a charm. Thank you!

            – Grisgram
            May 6 '18 at 7:15











          • Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

            – Christian
            Sep 25 '18 at 7:18


















          • Worked like a charm. Thank you!

            – Grisgram
            May 6 '18 at 7:15











          • Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

            – Christian
            Sep 25 '18 at 7:18

















          Worked like a charm. Thank you!

          – Grisgram
          May 6 '18 at 7:15





          Worked like a charm. Thank you!

          – Grisgram
          May 6 '18 at 7:15













          Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

          – Christian
          Sep 25 '18 at 7:18






          Thanks, good solution (others below didn't worked). Just had to close project, rename, open, wait gradle sync, close, rename again with previous name, open, and wait gradle sync, that's all...

          – Christian
          Sep 25 '18 at 7:18














          1














          1. Right Click on "Gradle Scripts"

          2. Click Load/Unload modules

          3. Load unloaded project module

          4. Done





          share|improve this answer



























            1














            1. Right Click on "Gradle Scripts"

            2. Click Load/Unload modules

            3. Load unloaded project module

            4. Done





            share|improve this answer

























              1












              1








              1







              1. Right Click on "Gradle Scripts"

              2. Click Load/Unload modules

              3. Load unloaded project module

              4. Done





              share|improve this answer













              1. Right Click on "Gradle Scripts"

              2. Click Load/Unload modules

              3. Load unloaded project module

              4. Done






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 7 '18 at 5:42









              ENSATEENSATE

              147111




              147111





















                  0














                  This worked for me:



                  In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.



                  Now my build.gradle (Project: X) shows.






                  share|improve this answer



























                    0














                    This worked for me:



                    In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.



                    Now my build.gradle (Project: X) shows.






                    share|improve this answer

























                      0












                      0








                      0







                      This worked for me:



                      In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.



                      Now my build.gradle (Project: X) shows.






                      share|improve this answer













                      This worked for me:



                      In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.



                      Now my build.gradle (Project: X) shows.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 8 '18 at 8:01









                      T.CoutlakisT.Coutlakis

                      1,50011116




                      1,50011116





















                          0














                          In my case, I found that my project.iml located in project/.idea
                          So I move it to project/
                          and change one line like following:



                          <module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />


                          the old one should look like this:



                          <module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />


                          After that, go back to android studio, every thing seems perfect!






                          share|improve this answer



























                            0














                            In my case, I found that my project.iml located in project/.idea
                            So I move it to project/
                            and change one line like following:



                            <module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />


                            the old one should look like this:



                            <module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />


                            After that, go back to android studio, every thing seems perfect!






                            share|improve this answer

























                              0












                              0








                              0







                              In my case, I found that my project.iml located in project/.idea
                              So I move it to project/
                              and change one line like following:



                              <module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />


                              the old one should look like this:



                              <module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />


                              After that, go back to android studio, every thing seems perfect!






                              share|improve this answer













                              In my case, I found that my project.iml located in project/.idea
                              So I move it to project/
                              and change one line like following:



                              <module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />


                              the old one should look like this:



                              <module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />


                              After that, go back to android studio, every thing seems perfect!







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Nov 14 '18 at 3:12









                              Kenneth TseKenneth Tse

                              265




                              265





















                                  0














                                  Close Android Studio. Remove project .idea folder. Open Android Studio -> Open your project. This worked for me!






                                  share|improve this answer



























                                    0














                                    Close Android Studio. Remove project .idea folder. Open Android Studio -> Open your project. This worked for me!






                                    share|improve this answer

























                                      0












                                      0








                                      0







                                      Close Android Studio. Remove project .idea folder. Open Android Studio -> Open your project. This worked for me!






                                      share|improve this answer













                                      Close Android Studio. Remove project .idea folder. Open Android Studio -> Open your project. This worked for me!







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 23 '18 at 4:06









                                      Mukhtar BimuratMukhtar Bimurat

                                      459




                                      459



























                                          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%2f46230078%2fmissing-project-gradle-in-android-view%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

                                          Top Tejano songwriter Luis Silva dead of heart attack at 64

                                          ReactJS Fetched API data displays live - need Data displayed static

                                          Evgeni Malkin