Java Cannot Resolve Symbol Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow cannot resolve symbol java intellij the company Business Learn more about hiring developers or posting ads with us Stack
Cannot Resolve Symbol Scala
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of cannot resolve symbol java android studio 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Getting “cannot find Symbol” in Java project in Intellij up vote 19 down vote favorite 3 I make cannot resolve symbol c# this call to a static singleton instance from the class "GameManager.java". HUD.getInstance().update(timeDelta); HUD.java contains the HUD class as well as two other related classes, HUDTextElement and HUDElement. All the classes are in the same root path ../src/org/mypackage However, when compiling this java project in IntelliJ I get "cannot find Symbol HUD" on the line I make the HUD.getInstance() call. This exact same code compiles just fine in eclipse, any idea what the
Intellij Cannot Resolve Symbol Gradle
problem is? java intellij-idea share|improve this question asked Aug 26 '12 at 16:50 joe 353128 Do you have the HUD class imported in both? –Alex Coleman Aug 26 '12 at 16:53 add a comment| 10 Answers 10 active oldest votes up vote 30 down vote I had the same problem, and turns out I had never completely compiled the fresh project. So right-clicking and selecting Compile'' (shift-cmd-F9 on mac) fixed it. It seems the compile on save does not 'see' non-compiled files. Marking the src folder as source did not help in my case. share|improve this answer answered Mar 6 '13 at 9:13 Sjoerd K 40142 This solved it for me. +1 :) –Babyburger Mar 2 '15 at 19:47 add a comment| up vote 13 down vote This is likely to be your ../src folder is not marked as a "source" folder in Intellij IDEA, so it doesn't know to look there to find your class. You can right click the folder in the project explorer and choose "mark as source folder" to fix this. share|improve this answer edited Aug 26 '12 at 17:02 answered Aug 26 '12 at 16:54 Paul Sanwald 5,40712242 1 is a possiblity, but wouldn't 2 not give him an error saying it couldn't find
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies intellij cannot resolve symbol springframework of this site About Us Learn more about Stack Overflow the company Business intellij cannot resolve symbol string Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Intellij Cannot Find Symbol
Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign http://stackoverflow.com/questions/12132003/getting-cannot-find-symbol-in-java-project-in-intellij up IntelliJ inspection gives “Cannot resolve symbol” but still compiles code up vote 203 down vote favorite 58 Platform: IntelliJ Community Edition 10.0.3 SDK: jdk1.6.0_21 OS: Windows 7 So I have a strange situation with IntelliJ that has me completely stumped. I setup a Maven project and add log4j as a dependency in the pom.xml file. The IDEA inspections run fine and http://stackoverflow.com/questions/5905896/intellij-inspection-gives-cannot-resolve-symbol-but-still-compiles-code my unit tests all compile and run. I then added hunnysoft's jmime library to my local maven repository using the mvn install:install-file as follows. mvn install:install-file -Dfile=jmime.jar -DgroupId=jmime \ -DartifactId=jmime -Dversion=3.1.1e -Dpackaging=jar Maven installed the jar file just fine into my local repository. I then went into IntelliJ's Settings => Maven => Repository Services and Updated my local repository (so that IntelliJ would reindex the repository contents). Finally, I added the following dependency to my pom.xml file (just above the log4j dependency).
to 5 of 5 Thread: How can I fix "Cannot resolve symbol" error LinkBack LinkBack URL About LinkBacks Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid http://www.java-forums.org/intellij-idea/44079-how-can-i-fix-cannot-resolve-symbol-error.html Mode Switch to Threaded Mode 05-15-2011,01:02 AM #1 yma16 Member Join Date Apr 2011 Posts 52 Rep Power 0 How can I fix "Cannot resolve symbol" error Hi, I put a class file under the classes folder. I do not have the java file for the class. When I use the class in the java file that contains main(), it gave me the "Cannot resolve symbol" error. How can I fix the problem? Thanks a lot. Reply With cannot resolve Quote 05-15-2011,02:00 AM #2 yma16 Member Join Date Apr 2011 Posts 52 Rep Power 0 after I compiled other java files, I found the classes folder is not the one to hold the class files. The folder is inside out\production folder. But after I put the class with other classes, the error is still there. How can I let IDEA know there is a new class? Reply With Quote 05-15-2011,02:05 AM #3 yma16 Member Join Date Apr 2011 cannot resolve symbol Posts 52 Rep Power 0 The Textpad4 compiled the files ok. It must be IEAD 10's problem. Reply With Quote 05-15-2011,02:59 AM #4 RichersooN Senior Member Join Date Jan 2011 Location Rizal Province, Philippiines Posts 167 Rep Power 0 you could use absolute path Reply With Quote 05-16-2011,12:28 PM #5 Tolls Moderator Join Date Apr 2009 Posts 12,956 Rep Power 22 Under the libraries bit of module settings you need to attach classes. Assuming this is a standalone class you'll need to stick it in a directory of its own, ensuring its location in that directory (that is the directory path) matches its package. Then attach that folder as a class folder. It is unusual to import a single class into code, which is why this may sound a long winded way of doing it. Reply With Quote « add POJO servlet in EJB web service | How to display the console window? » Similar Threads Do you know why I'm getting "cannot find symbol" error? By basla in forum New To Java Replies: 5 Last Post: 04-24-2011, 03:21 PM Error "can not find symbol variable" By FullMetalHollow in forum New To Java Replies: 5 Last Post: 10-04-2009, 09:51 PM genjar - "Unable to resolve:" By angryboy in forum New To Java Replies: 0 Last Post: 06-28-2009, 06:48 AM the dollar sign "$", prints like any other normal char in java l