Cannot resolve syymbol 'build' on line import com.android.build.OutputFile in app/build.gradle











up vote
4
down vote

favorite
1












So I just created a react native project using the command



react-native init "project-name"



I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line



import com.android.build.OutputFile



However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?










share|improve this question






















  • Where is this import line? What file?
    – Code-Apprentice
    Oct 4 '16 at 0:20










  • It's in the app level build.gradle, android/app/build.gradle
    – Dfarrelly
    Oct 4 '16 at 0:24










  • Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
    – George
    Oct 4 '16 at 11:38










  • I got the same issue. Did you find out how to solve it?
    – arne.z
    Oct 16 '17 at 16:54















up vote
4
down vote

favorite
1












So I just created a react native project using the command



react-native init "project-name"



I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line



import com.android.build.OutputFile



However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?










share|improve this question






















  • Where is this import line? What file?
    – Code-Apprentice
    Oct 4 '16 at 0:20










  • It's in the app level build.gradle, android/app/build.gradle
    – Dfarrelly
    Oct 4 '16 at 0:24










  • Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
    – George
    Oct 4 '16 at 11:38










  • I got the same issue. Did you find out how to solve it?
    – arne.z
    Oct 16 '17 at 16:54













up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





So I just created a react native project using the command



react-native init "project-name"



I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line



import com.android.build.OutputFile



However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?










share|improve this question













So I just created a react native project using the command



react-native init "project-name"



I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line



import com.android.build.OutputFile



However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?







android android-studio react-native






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 3 '16 at 22:40









Dfarrelly

8019




8019












  • Where is this import line? What file?
    – Code-Apprentice
    Oct 4 '16 at 0:20










  • It's in the app level build.gradle, android/app/build.gradle
    – Dfarrelly
    Oct 4 '16 at 0:24










  • Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
    – George
    Oct 4 '16 at 11:38










  • I got the same issue. Did you find out how to solve it?
    – arne.z
    Oct 16 '17 at 16:54


















  • Where is this import line? What file?
    – Code-Apprentice
    Oct 4 '16 at 0:20










  • It's in the app level build.gradle, android/app/build.gradle
    – Dfarrelly
    Oct 4 '16 at 0:24










  • Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
    – George
    Oct 4 '16 at 11:38










  • I got the same issue. Did you find out how to solve it?
    – arne.z
    Oct 16 '17 at 16:54
















Where is this import line? What file?
– Code-Apprentice
Oct 4 '16 at 0:20




Where is this import line? What file?
– Code-Apprentice
Oct 4 '16 at 0:20












It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24




It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24












Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38




Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38












I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54




I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54












2 Answers
2






active

oldest

votes

















up vote
1
down vote













Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile. then if it show press ALT + Enter, you should do it.






share|improve this answer






























    up vote
    0
    down vote













    Be sure you have classpath 'com.android.tools.build:gradle:2.2.0' in the dependencies block of your app level build.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',
      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%2f39841532%2fcannot-resolve-syymbol-build-on-line-import-com-android-build-outputfile-in-ap%23new-answer', 'question_page');
      }
      );

      Post as a guest
































      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile. then if it show press ALT + Enter, you should do it.






      share|improve this answer



























        up vote
        1
        down vote













        Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile. then if it show press ALT + Enter, you should do it.






        share|improve this answer

























          up vote
          1
          down vote










          up vote
          1
          down vote









          Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile. then if it show press ALT + Enter, you should do it.






          share|improve this answer














          Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile. then if it show press ALT + Enter, you should do it.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago









          Billal Begueradj

          5,501132637




          5,501132637










          answered Jul 25 at 7:00









          Pangeran Zuckerberg

          3116




          3116
























              up vote
              0
              down vote













              Be sure you have classpath 'com.android.tools.build:gradle:2.2.0' in the dependencies block of your app level build.gradle file.






              share|improve this answer

























                up vote
                0
                down vote













                Be sure you have classpath 'com.android.tools.build:gradle:2.2.0' in the dependencies block of your app level build.gradle file.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Be sure you have classpath 'com.android.tools.build:gradle:2.2.0' in the dependencies block of your app level build.gradle file.






                  share|improve this answer












                  Be sure you have classpath 'com.android.tools.build:gradle:2.2.0' in the dependencies block of your app level build.gradle file.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 4 '16 at 0:29









                  Code-Apprentice

                  46.1k1486164




                  46.1k1486164






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39841532%2fcannot-resolve-syymbol-build-on-line-import-com-android-build-outputfile-in-ap%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest




















































































                      Popular posts from this blog

                      Bressuire

                      Vorschmack

                      Quarantine